private JavaRDDLike<?, ?> getJavaRDDLikeInternal(SparkRuntime runtime) {
JavaRDDLike<?, ?> parentRDD = ((SparkCollection) getOnlyParent()).getJavaRDDLike(runtime);
fn.configure(runtime.getConfiguration());
if (parentRDD instanceof JavaRDD) {
return ((JavaRDD) parentRDD).mapPartitions(new FlatMapDoFn(fn, runtime.getRuntimeContext()));
} else {
return ((JavaPairRDD) parentRDD).mapPartitions(new FlatMapPairDoFn(fn, runtime.getRuntimeContext()));
}
}