Repository: spark
Updated Branches:
  refs/heads/branch-1.0 5481196ab -> d60f60ccc


[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 #1902 from larryxiao/2981 and squashes the following commits:

88059a2 [Larry Xiao] [SPARK-2981][GraphX] EdgePartition1D Int overflow

(cherry picked from commit aa7de128c5987fd2e134736f07ae913ad1f5eb26)
Signed-off-by: Ankur Dave <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d60f60cc
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d60f60cc
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d60f60cc

Branch: refs/heads/branch-1.0
Commit: d60f60ccc73ff717e2811a549a2a9ed5bdfd405b
Parents: 5481196
Author: Larry Xiao <[email protected]>
Authored: Tue Sep 2 18:50:52 2014 -0700
Committer: Ankur Dave <[email protected]>
Committed: Tue Sep 2 18:51:16 2014 -0700

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/d60f60cc/graphx/src/main/scala/org/apache/spark/graphx/PartitionStrategy.scala
----------------------------------------------------------------------
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 1526cce..a1ab199 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
     }
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to