Skip to content

Commit d6d60e2

Browse files
committed
In GraphLoader, coalesce to minEdgePartitions
1 parent 62c7b78 commit d6d60e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ object GraphLoader extends Logging {
6060
val startTime = System.currentTimeMillis
6161

6262
// Parse the edge data table directly into edge partitions
63-
val edges = sc.textFile(path, minEdgePartitions).mapPartitionsWithIndex { (pid, iter) =>
63+
val edges = sc.textFile(path, minEdgePartitions).coalesce(minEdgePartitions).mapPartitionsWithIndex { (pid, iter) =>
6464
val builder = new EdgePartitionBuilder[Int]
6565
iter.foreach { line =>
6666
if (!line.isEmpty && line(0) != '#') {

0 commit comments

Comments
 (0)