diff options
author | Mark Hamstra <markhamstra@gmail.com> | 2013-02-05 22:19:58 -0800 |
---|---|---|
committer | Mark Hamstra <markhamstra@gmail.com> | 2013-02-05 22:19:58 -0800 |
commit | 934a53c8b677df524315a75011b4c9396eb4b54e (patch) | |
tree | 273cb2e688e393fb6fc52bab8b7d5bd864459c9c /core | |
parent | 84587a9bf3c734be151251b97ac5af48eb03f4d9 (diff) | |
download | spark-934a53c8b677df524315a75011b4c9396eb4b54e.tar.gz spark-934a53c8b677df524315a75011b4c9396eb4b54e.tar.bz2 spark-934a53c8b677df524315a75011b4c9396eb4b54e.zip |
Change docs on 'reduce' since the merging of local reduces no longer preserves
ordering, so the reduce function must also be commutative.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/RDD.scala | 2 | ||||
-rw-r--r-- | core/src/main/scala/spark/api/java/JavaRDDLike.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/scala/spark/RDD.scala b/core/src/main/scala/spark/RDD.scala index d15c6f7396..3ad3b4d233 100644 --- a/core/src/main/scala/spark/RDD.scala +++ b/core/src/main/scala/spark/RDD.scala @@ -330,7 +330,7 @@ abstract class RDD[T: ClassManifest](@transient sc: SparkContext) extends Serial def toArray(): Array[T] = collect() /** - * Reduces the elements of this RDD using the specified associative binary operator. + * Reduces the elements of this RDD using the specified commutative and associative binary operator. */ def reduce(f: (T, T) => T): T = { val cleanF = sc.clean(f) diff --git a/core/src/main/scala/spark/api/java/JavaRDDLike.scala b/core/src/main/scala/spark/api/java/JavaRDDLike.scala index 81d3a94466..6da89f518f 100644 --- a/core/src/main/scala/spark/api/java/JavaRDDLike.scala +++ b/core/src/main/scala/spark/api/java/JavaRDDLike.scala @@ -201,7 +201,7 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]] extends Serializable { } /** - * Reduces the elements of this RDD using the specified associative binary operator. + * Reduces the elements of this RDD using the specified commutative and associative binary operator. */ def reduce(f: JFunction2[T, T, T]): T = rdd.reduce(f) |