for(i <- 1 to 20) {
val tmp = rdd.sample(true, 1)
val rdd2 = resampledData(tmp)
}
I would like to combine every rdd2 in the loop in single rdd. The type of rdd2 is RDD[(String, Double, Double)] and how can I initialize the new vriable if required?