Skip to content

Commit

Permalink
Update comment to better reflect what we're doing
Browse files Browse the repository at this point in the history
  • Loading branch information
ash211 committed Sep 3, 2014
1 parent 09a27f7 commit e5f7e4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions core/src/main/scala/org/apache/spark/rdd/RDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,8 @@ abstract class RDD[T: ClassTag](
// greater than totalParts because we actually cap it at totalParts in runJob.
var numPartsToTry = 1
if (partsScanned > 0) {
// If we didn't find any rows after the first iteration, just try all partitions next.
// Otherwise, interpolate the number of partitions we need to try, but overestimate it
// by 50%.
// If we didn't find any rows after the previous iteration, double and retry. Otherwise,
// interpolate the number of partitions we need to try, but overestimate it by 50%.
if (buf.size == 0) {
numPartsToTry = partsScanned * 2
} else {
Expand Down
6 changes: 3 additions & 3 deletions python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,9 +1031,9 @@ def take(self, num):
# we actually cap it at totalParts in runJob.
numPartsToTry = 1
if partsScanned > 0:
# If we didn't find any rows after the first iteration, just
# try all partitions next. Otherwise, interpolate the number
# of partitions we need to try, but overestimate it by 50%.
# If we didn't find any rows after the previous iteration,
# double and retry. Otherwise, interpolate the number of
# partitions we need to try, but overestimate it by 50%.
if len(items) == 0:
numPartsToTry = partsScanned * 2
else:
Expand Down

0 comments on commit e5f7e4d

Please sign in to comment.