Skip to content

Commit 16e79e3

Browse files
committed
Fixed incorrect statement about failure
1 parent 7fcc10d commit 16e79e3

File tree

1 file changed

+3
-5
lines changed
  • core/src/main/scala/org/apache/spark/rdd

1 file changed

+3
-5
lines changed

core/src/main/scala/org/apache/spark/rdd/RDD.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,13 +1087,11 @@ abstract class RDD[T: ClassTag](
10871087
val curNumPartitions = numPartitions
10881088
partiallyAggregated = partiallyAggregated.mapPartitionsWithIndex {
10891089
(i, iter) => iter.map((i % curNumPartitions, _))
1090-
}.reduceByKey(new HashPartitioner(curNumPartitions), cleanCombOp).values
1091-
// This fails:
1092-
// .foldByKey(zeroValue, new HashPartitioner(curNumPartitions))(cleanCombOp).values
1090+
}.foldByKey(zeroValue, new HashPartitioner(curNumPartitions))(cleanCombOp).values
10931091
}
1094-
partiallyAggregated.reduce(cleanCombOp)
1092+
//partiallyAggregated.reduce(cleanCombOp)
10951093
// This fails:
1096-
// partiallyAggregated.fold(zeroValue)(cleanCombOp)
1094+
partiallyAggregated.fold(zeroValue)(cleanCombOp)
10971095
}
10981096
}
10991097

0 commit comments

Comments
 (0)