title: How to ensure that each partition of an RDD has some data
body: <p>I have an RDD of 36 elements. I have a cluster of 3 nodes with 4 cores each. I have repartitioned the RDD in 36 parts so that each partition might have an element to process but the entire 36 elements are partitioned such that only 4 parts has 9 elements each and rest of the parts are empty and hence have nothing to process and the server resources are underutilized. </p>
  
  <p>How can I repartition the data to ensure that every part has some data to process? How can I ensure that every part has exactly 3 element to process? </p>