git commit: [SPARK-2981][GraphX] EdgePartition1D Int overflow

2014-09-02 Thread ankurdave
Repository: spark
Updated Branches:
  refs/heads/master 7c9bbf172 - aa7de128c


[SPARK-2981][GraphX] EdgePartition1D Int overflow

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

Author: Larry Xiao xia...@sjtu.edu.cn

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

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


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

Branch: refs/heads/master
Commit: aa7de128c5987fd2e134736f07ae913ad1f5eb26
Parents: 7c9bbf1
Author: Larry Xiao xia...@sjtu.edu.cn
Authored: Tue Sep 2 18:50:52 2014 -0700
Committer: Ankur Dave ankurd...@gmail.com
Committed: Tue Sep 2 18:50:52 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/aa7de128/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 5e7e72a..13033fe 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: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org



git commit: [SPARK-2981][GraphX] EdgePartition1D Int overflow

2014-09-02 Thread ankurdave
Repository: spark
Updated Branches:
  refs/heads/branch-1.1 7267e402c - 9b0cff2d4


[SPARK-2981][GraphX] EdgePartition1D Int overflow

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

Author: Larry Xiao xia...@sjtu.edu.cn

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 ankurd...@gmail.com


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

Branch: refs/heads/branch-1.1
Commit: 9b0cff2d45027cc348f5c5dd095d137368457779
Parents: 7267e40
Author: Larry Xiao xia...@sjtu.edu.cn
Authored: Tue Sep 2 18:50:52 2014 -0700
Committer: Ankur Dave ankurd...@gmail.com
Committed: Tue Sep 2 18:51:03 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/9b0cff2d/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 5e7e72a..13033fe 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: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org



git commit: [SPARK-2981][GraphX] EdgePartition1D Int overflow

2014-09-02 Thread ankurdave
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 xia...@sjtu.edu.cn

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 ankurd...@gmail.com


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 xia...@sjtu.edu.cn
Authored: Tue Sep 2 18:50:52 2014 -0700
Committer: Ankur Dave ankurd...@gmail.com
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: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org