Skip to content

Commit

Permalink
change foreach to for
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Jul 27, 2014
1 parent eb39b08 commit 6cc2551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/Partitioner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class RangePartitioner[K : Ordering : ClassTag, V](
} else {
// The weight is 1 over the sampling probability.
val weight = (n.toDouble / sample.size).toFloat
sample.foreach { key =>
for (key <- sample) {
candidates += ((key, weight))
}
}
Expand Down

0 comments on commit 6cc2551

Please sign in to comment.