Skip to content

Commit 09a27f7

Browse files
committed
Update PySpark to be less OOM-prone as well
1 parent 3a156b8 commit 09a27f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/rdd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ def take(self, num):
10351035
# try all partitions next. Otherwise, interpolate the number
10361036
# of partitions we need to try, but overestimate it by 50%.
10371037
if len(items) == 0:
1038-
numPartsToTry = totalParts - 1
1038+
numPartsToTry = partsScanned * 2
10391039
else:
10401040
numPartsToTry = int(1.5 * num * partsScanned / len(items))
10411041

0 commit comments

Comments
 (0)