Execute multiple actions parallel/async in Spark Streaming
<p>is there a way to execute multiple actions async/parallel in spark streaming?
Here is my code:</p>

<pre><code>positions.foreachRDD(rdd -&gt; {

           JavaRDD&lt;A&gt; pbv = rdd.map(p -&gt; A.create(p));          
           javaFunctions(pbv).writerBuilder("poc", "table_a", mapToRow(A.class)).saveToCassandra();     

           JavaRDD&lt;D&gt; pbd = rdd.map(p -&gt; D.create(p));          
           javaFunctions(pbd).writerBuilder("poc", "table_d", mapToRow(D.class)).saveToCassandra();             

           JavaRDD&lt;L&gt; pblv = rdd.map(p -&gt; L.create(p));         
           javaFunctions(pblv).writerBuilder("poc", "table_l", mapToRow(L.class)).saveToCassandra();            

           JavaRDD&lt;V&gt; pbld = rdd.map(p -&gt; V.create(p));         
           javaFunctions(pbld).writerBuilder("poc", "table_v", mapToRow(V.class)).saveToCassandra();

    });
</code></pre>

<p>I would like to do the saveToCassandra actions in parallel, is this possible with "spark technics" or only via selfmade Thread/Executer handling?</p>

<p>Thanks for your help!</p>

<p>Regards,
Markus</p>