title: How to get the number of elements in partition?
body: <p>Is there any way to get the number of elements in a spark RDD partition, given the partition ID? Without scanning the entire partition.</p>
  
  <p>Something like this:</p>
  
  <pre><code>Rdd.partitions().get(index).size()
  </code></pre>
  
  <p>Except I don't see such an API for spark. Any ideas? workarounds? </p>
  
  <p>Thanks</p>