Skip to content

Commit

Permalink
logwarnning as soon as it enters the while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
dorx committed Jun 12, 2014
1 parent 55518ed commit 64e445b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/src/main/scala/org/apache/spark/rdd/RDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,7 @@ abstract class RDD[T: ClassTag](
// this shouldn't happen often because we use a big multiplier for the initial size
var numIters = 0
while (samples.length < num) {
if (numIters > 0) {
logWarning(s"Needed to re-sample due to insufficient sample size. Repeat #$numIters")
}
logWarning(s"Needed to re-sample due to insufficient sample size. Repeat #$numIters")
samples = this.sample(withReplacement, fraction, rand.nextInt()).collect()
numIters += 1
}
Expand Down

0 comments on commit 64e445b

Please sign in to comment.