Repository: spark
Updated Branches:
  refs/heads/branch-1.4 f904b46c9 -> dea04bf84


[SPARK-3190] [GRAPHX] Fix VertexRDD.count() overflow regression

SPARK-3190 was originally fixed by 96df92906978c5f58e0cc8ff5eebe5b35a08be3b, 
but a5ef58113667ff73562ce6db381cff96a0b354b0 introduced a regression during 
refactoring. This commit fixes the regression.

Author: Ankur Dave <ankurd...@gmail.com>

Closes #7923 from ankurdave/SPARK-3190-reopening and squashes the following 
commits:

a3e1b23 [Ankur Dave] Fix VertexRDD.count() overflow regression

(cherry picked from commit 9e952ecbce670e9b532a1c664a4d03b66e404112)
Signed-off-by: Reynold Xin <r...@databricks.com>


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

Branch: refs/heads/branch-1.4
Commit: dea04bf84f2ed17c1d70ee3b0124011949b6a11e
Parents: f904b46
Author: Ankur Dave <ankurd...@gmail.com>
Authored: Mon Aug 3 23:07:32 2015 -0700
Committer: Reynold Xin <r...@databricks.com>
Committed: Mon Aug 3 23:07:49 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/spark/blob/dea04bf8/graphx/src/main/scala/org/apache/spark/graphx/impl/VertexRDDImpl.scala
----------------------------------------------------------------------
diff --git 
a/graphx/src/main/scala/org/apache/spark/graphx/impl/VertexRDDImpl.scala 
b/graphx/src/main/scala/org/apache/spark/graphx/impl/VertexRDDImpl.scala
index 33ac7b0..7f4e7e9 100644
--- a/graphx/src/main/scala/org/apache/spark/graphx/impl/VertexRDDImpl.scala
+++ b/graphx/src/main/scala/org/apache/spark/graphx/impl/VertexRDDImpl.scala
@@ -87,7 +87,7 @@ class VertexRDDImpl[VD] private[graphx] (
 
   /** The number of vertices in the RDD. */
   override def count(): Long = {
-    partitionsRDD.map(_.size).reduce(_ + _)
+    partitionsRDD.map(_.size.toLong).reduce(_ + _)
   }
 
   override private[graphx] def mapVertexPartitions[VD2: ClassTag](


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to