Skip to content

Commit

Permalink
infix operator style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yingjieMiao committed Oct 9, 2014
1 parent 4391d3b commit 4b6e777
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ class AsyncRDDActions[T: ClassTag](self: RDD[T]) extends Serializable with Loggi
numPartsToTry = partsScanned * 4
} else {
// the left side of max is >=1 whenever partsScanned >= 2
numPartsToTry = ((1.5 * num * partsScanned / results.size).toInt - partsScanned) max 1
numPartsToTry = numPartsToTry min (partsScanned * 4)
numPartsToTry = Math.max((1.5 * num * partsScanned / results.size).toInt - partsScanned, 1)
numPartsToTry = Math.min(numPartsToTry, partsScanned * 4)
}
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/rdd/RDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1086,8 +1086,8 @@ abstract class RDD[T: ClassTag](
numPartsToTry = partsScanned * 4
} else {
// the left side of max is >=1 whenever partsScanned >= 2
numPartsToTry = ((1.5 * num * partsScanned / buf.size).toInt - partsScanned) max 1
numPartsToTry = numPartsToTry min (partsScanned * 4)
numPartsToTry = Math.max((1.5 * num * partsScanned / buf.size).toInt - partsScanned, 1)
numPartsToTry = Math.min(numPartsToTry, partsScanned * 4)
}
}

Expand Down

0 comments on commit 4b6e777

Please sign in to comment.