Skip to content

Commit 641f468

Browse files
committed
Avoid overflow in VertexRDD.count()
1 parent 1f1819b commit 641f468

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphx/src/main/scala/org/apache/spark/graphx/VertexRDD.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class VertexRDD[@specialized VD: ClassTag](
108108

109109
/** The number of vertices in the RDD. */
110110
override def count(): Long = {
111-
partitionsRDD.map(_.size).reduce(_ + _)
111+
partitionsRDD.map(_.size.toLong).reduce(_ + _)
112112
}
113113

114114
/**

0 commit comments

Comments
 (0)