title: Why is `getNumPartitions()` not giving me the correct number of partitions specified by `repartition`?
body: <p>I have a <code>textFile</code> in and RDD like so: <code>sc.textFile(&lt;file_name&gt;)</code>.</p>
  
  <p>I try to repartition the RDD in order to speed up processing:</p>
  
  <p><code>sc.repartition(&lt;n&gt;)</code>.  </p>
  
  <p>No matter what I put in for <code>&lt;n&gt;</code>, it does not seem to change, as indicated by:</p>
  
  <p><code>RDD.getNumPartitions()</code> always prints the same number <code>(3)</code> no matter what.  </p>
  
  <p>How do I change the number of partitions to increase performance?</p>