title: spark parallelize writes using list of dataframes
body: <p>I have a list of dataframe created using jdbc. Is there a way to write them in parallel using parquet?</p>
  
  <pre><code>val listOfTableNameAndDf = for {
    table &lt;- tableNames
  } yield (table, sqlContext.read.jdbc(jdbcUrl, table,  new Properties))
  </code></pre>
  
  <p>I can write them sequentially, but is there a way to parallelize the writes or make it faster.</p>
  
  <pre><code>listOfTableNameAndDf.map { x =&gt; {
    x._2.write.mode(org.apache.spark.sql.SaveMode.Overwrite).parquet(getStatingDir(x._1)) 
    }
  }
  </code></pre>