title: Spark: increase number of partitions without causing a shuffle?
body: <p>When decreasing the number of partitions one can use <code>coalesce</code>, which is great because it doesn't cause a shuffle and seems to work instantly (doesn't require an additional job stage).</p>
  
  <p>I would like to do the opposite sometimes, but <code>repartition</code> induces a shuffle. I think a few months ago I actually got this working by using <code>CoalescedRDD</code> with <code>balanceSlack = 1.0</code> - so what would happen is it would split a partition so that the resulting partitions location where all on the same node (so small net IO).</p>
  
  <p>This kind of functionality is automatic in Hadoop, one just tweaks the split size. It doesn't seem to work this way in Spark unless one is decreasing the number of partitions.  I think the solution might be to write a custom partitioner along with a custom RDD where we define <code>getPreferredLocations</code> ... but I thought that is such a simple and common thing to do surely there must be a straight forward way of doing it?</p>
  
  <p><strong>Things tried:</strong></p>
  
  <p><code>.set("spark.default.parallelism", partitions)</code> on my <code>SparkConf</code>, and when in the context of reading parquet I've tried <code>sqlContext.sql("set spark.sql.shuffle.partitions= ...</code>, which on 1.0.0 causes an error AND not really want I want, I want partition number to change across all types of job, not just shuffles.</p>