Skip to content

Commit 9884a9f

Browse files
committed
style fix
1 parent bbfb8c9 commit 9884a9f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
216216

217217
val samplingFunc = if (withReplacement) {
218218
val counts = if (exact) Some(this.countByKey()) else None
219-
StratifiedSampler.getPoissonSamplingFunction(self, fractions, exact, counts, seed)
219+
StratifiedSampler.getPoissonSamplingFunction(self, fractions, exact, counts, seed)
220220
} else {
221-
StratifiedSampler.getBernoulliSamplingFunction(self, fractions, exact, seed)
221+
StratifiedSampler.getBernoulliSamplingFunction(self, fractions, exact, seed)
222222
}
223223
self.mapPartitionsWithIndex(samplingFunc, preservesPartitioning=true)
224224
}

core/src/main/scala/org/apache/spark/util/random/StratifiedSampler.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ private[spark] object StratifiedSampler extends Logging {
155155
* to be included in the sample.
156156
*/
157157
def computeThresholdByKey[K](finalResult: Map[K, Stratum],
158-
fractions: Map[K, Double]):
159-
Map[K, Double] = {
158+
fractions: Map[K, Double]): Map[K, Double] = {
160159
val thresholdByKey = new HashMap[K, Double]()
161160
for ((key, stratum) <- finalResult) {
162161
val s = math.ceil(stratum.numItems * fractions(key)).toLong

0 commit comments

Comments
 (0)