Skip to content

Commit 74b8c95

Browse files
author
Brennon York
committed
corrected method by leveraging bitmask operations to correctly return only the portions of that are different from the calling VertexRDD
1 parent 9717120 commit 74b8c95

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

graphx/src/main/scala/org/apache/spark/graphx/impl/VertexPartitionBaseOps.scala

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -93,32 +93,8 @@ private[graphx] abstract class VertexPartitionBaseOps
9393
* the values from `other`.
9494
*/
9595
def diff(other: Self[VD]): Self[VD] = {
96-
// if (self.index != other.index) {
97-
// logWarning("Diffing two VertexPartitions with different indexes is slow.")
98-
// diff(createUsingIndex(other.iterator))
99-
// } else {
100-
// val newMask = self.mask & other.mask
101-
/* logInfo("NEWMASK START " + other.iterator.mkString + " AND " +
102-
self.iterator.mkString)
103-
var i = newMask.nextSetBit(0)
104-
while (i >= 0) {
105-
if (self.values(i) == other.values(i)) {
106-
logInfo("BEFORE i: " + i + " newMask: " + newMask.iterator.mkString +
107-
" sv " + self.values(i) + " ov " + other.values(i) + " om: " +
108-
other.mask.iterator.mkString + " selfm: " +
109-
self.mask.iterator.mkString)
110-
newMask.unset(i)
111-
}
112-
i = newMask.nextSetBit(i + 1)
113-
}*/
114-
/*
115-
this
116-
.withIndex(other.index)
117-
.withValues(other.values)
118-
.withMask((self.mask & other.mask) ^ other.mask)
119-
* */
96+
// SPARK-4600: Use bitmask operations to only show the values in `other`.
12097
other.withMask((self.mask & other.mask) ^ other.mask)
121-
// }
12298
}
12399

124100
/** Left outer join another VertexPartition. */

0 commit comments

Comments
 (0)