flatMapValues

fun <K, V, U> JavaRDD<Tuple2<K, V>>.flatMapValues(f: (V) -> Iterator<U>): JavaRDD<Tuple2<K, U>>

Pass each value in the key-value pair RDD through a flatMap function without changing the keys; this also retains the original RDD's partitioning.


fun <K, V, U> JavaDStream<Tuple2<K, V>>.flatMapValues(flatMapValuesFunc: (V) -> Iterator<U>): JavaDStream<Tuple2<K, U>>

Return a new DStream by applying a flatmap function to the value of each key-value pairs in 'this' DStream without changing the key.