aboutsummaryrefslogtreecommitdiff
path: root/graphx
diff options
context:
space:
mode:
authorLarry Xiao <xiaodi@sjtu.edu.cn>2014-09-02 18:50:52 -0700
committerAnkur Dave <ankurdave@gmail.com>2014-09-02 18:50:52 -0700
commitaa7de128c5987fd2e134736f07ae913ad1f5eb26 (patch)
tree6470341c472dc1b07fd6d7a2336cc9eb971ed8e0 /graphx
parent7c9bbf172512701c75992671bcb2f4b6d9e5034b (diff)
downloadspark-aa7de128c5987fd2e134736f07ae913ad1f5eb26.tar.gz
spark-aa7de128c5987fd2e134736f07ae913ad1f5eb26.tar.bz2
spark-aa7de128c5987fd2e134736f07ae913ad1f5eb26.zip
[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
Diffstat (limited to 'graphx')
-rw-r--r--graphx/src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphx/src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala b/graphx/src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala
index 5e7e72a764..13033fee0e 100644
--- a/graphx/src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala
+++ b/graphx/src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala
@@ -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
}
}