File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
core/src/main/scala/org/apache/spark/rdd Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ class AsyncRDDActions[T: ClassTag](self: RDD[T]) extends Serializable with Loggi
8585 numPartsToTry = partsScanned * 4
8686 } else {
8787 // the left side of max is >=1 whenever partsScanned >= 2
88- numPartsToTry = ((1.5 * num * partsScanned / results.size).toInt - partsScanned) max 1
89- numPartsToTry = numPartsToTry min ( partsScanned * 4 )
88+ numPartsToTry = Math .max ((1.5 * num * partsScanned / results.size).toInt - partsScanned, 1 )
89+ numPartsToTry = Math . min(numPartsToTry, partsScanned * 4 )
9090 }
9191 }
9292
Original file line number Diff line number Diff line change @@ -1086,8 +1086,8 @@ abstract class RDD[T: ClassTag](
10861086 numPartsToTry = partsScanned * 4
10871087 } else {
10881088 // the left side of max is >=1 whenever partsScanned >= 2
1089- numPartsToTry = ((1.5 * num * partsScanned / buf.size).toInt - partsScanned) max 1
1090- numPartsToTry = numPartsToTry min ( partsScanned * 4 )
1089+ numPartsToTry = Math .max ((1.5 * num * partsScanned / buf.size).toInt - partsScanned, 1 )
1090+ numPartsToTry = Math . min(numPartsToTry, partsScanned * 4 )
10911091 }
10921092 }
10931093
You can’t perform that action at this time.
0 commit comments