aboutsummaryrefslogtreecommitdiff
path: root/graphx
diff options
context:
space:
mode:
authorAnkur Dave <ankurdave@gmail.com>2015-08-03 23:07:32 -0700
committerReynold Xin <rxin@databricks.com>2015-08-03 23:07:39 -0700
commit29f2d5a065254e7ed44fb204a1deecf9d44d338c (patch)
treeb3327cd5af97d6bde49590e385378a8372f137e0 /graphx
parent1f7dbcd6fdeee22c7b670ea98dcb4e794f84a8cd (diff)
downloadspark-29f2d5a065254e7ed44fb204a1deecf9d44d338c.tar.gz
spark-29f2d5a065254e7ed44fb204a1deecf9d44d338c.tar.bz2
spark-29f2d5a065254e7ed44fb204a1deecf9d44d338c.zip
[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 <ankurdave@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 <rxin@databricks.com>
Diffstat (limited to 'graphx')
-rw-r--r--graphx/src/main/scala/org/apache/spark/graphx/impl/VertexRDDImpl.scala2
1 files changed, 1 insertions, 1 deletions
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 33ac7b0ed6..7f4e7e9d79 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](