title: co-located vs. co-partitioned RDDs
body: <p>I'm quite newbie in Spark and I have 2 Question:</p>
  
  <ol>
  <li>I have a large set of points and I made an RDD (called <code>partitionedData</code>) from them and partitioned it based on a custom partitioner so that each partition has at most a threshold number of points. Because I need to choose some Points as a <b>leader</b> in each partition and <b> be sure that the corresponding leaders and points in each partition are in a <i>same node</i></B>, I <code>mapPartitions</code> the <code>partitionedData</code> and set the <code>preservesPartitioning</code> flag as <code>true</code>. Finally, the result of this RDD is my desired <b>leader RDD</b>. Here is my first question: I know that the leader RDD preserves it's parent RDD partitioning (<b>co-partitioned</b>), but I'm not sure if the the leaders in each partition will be placed in a <b><i>same node</i></b> as their parents Points (<b>co-located</b>)?</li>
  <li>If the answer of the above question is <b>NO</b>, so how can I co-locate the partitions of a given RDD with another pre-partitioned RDD?</li>
  </ol>