Skip to content

Commit aa7de12

Browse files
larryxiaoankurdave
authored andcommitted
[SPARK-2981][GraphX] EdgePartition1D Int overflow
minor fix detail is here: https://issues.apache.org/jira/browse/SPARK-2981 Author: Larry Xiao <[email protected]> Closes apache#1902 from larryxiao/2981 and squashes the following commits: 88059a2 [Larry Xiao] [SPARK-2981][GraphX] EdgePartition1D Int overflow
1 parent 7c9bbf1 commit aa7de12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphx/src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ object PartitionStrategy {
9191
case object EdgePartition1D extends PartitionStrategy {
9292
override def getPartition(src: VertexId, dst: VertexId, numParts: PartitionID): PartitionID = {
9393
val mixingPrime: VertexId = 1125899906842597L
94-
(math.abs(src) * mixingPrime).toInt % numParts
94+
(math.abs(src * mixingPrime) % numParts).toInt
9595
}
9696
}
9797

0 commit comments

Comments
 (0)