In the following code it appears to be that functions fn1 & fn2 are applied to inRDD in sequential manner as I see in the Stages section of Spark Web UI.
DstreamRDD1.foreachRDD(new VoidFunction<JavaRDD<String>>()
{
public void call(JavaRDD<String> inRDD)
{
inRDD.foreach(fn1)
inRDD.foreach(fn2)
}
}
How is is different when streaming job is run this way. Are the below functions run in parallel on input Dstream?
DStreamRDD1.foreachRDD(fn1)
DStreamRDD2.foreachRDD(fn2)