spark.rdd.FlatMappedRDD.scala Maven / Gradle / Ivy
package spark.rdd
import spark.{RDD, Partition, TaskContext}
private[spark]
class FlatMappedRDD[U: ClassManifest, T: ClassManifest](
prev: RDD[T],
f: T => TraversableOnce[U])
extends RDD[U](prev) {
override def getPartitions: Array[Partition] = firstParent[T].partitions
override def compute(split: Partition, context: TaskContext) =
firstParent[T].iterator(split, context).flatMap(f)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy