Skip to content
Snippets Groups Projects
Commit aa7de128 authored by Larry Xiao's avatar Larry Xiao Committed by Ankur Dave
Browse files

[SPARK-2981][GraphX] EdgePartition1D Int overflow

minor fix
detail is here: https://issues.apache.org/jira/browse/SPARK-2981

Author: Larry Xiao <xiaodi@sjtu.edu.cn>

Closes #1902 from larryxiao/2981 and squashes the following commits:

88059a2 [Larry Xiao] [SPARK-2981][GraphX] EdgePartition1D Int overflow
parent 7c9bbf17
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ object PartitionStrategy {
case object EdgePartition1D extends PartitionStrategy {
override def getPartition(src: VertexId, dst: VertexId, numParts: PartitionID): PartitionID = {
val mixingPrime: VertexId = 1125899906842597L
(math.abs(src) * mixingPrime).toInt % numParts
(math.abs(src * mixingPrime) % numParts).toInt
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment