title: Spark RDD take and delete rows
body: <p>I have an RDD of 1000 elements. I want to take 100 elements from it and then remove those 100 from the initial RDD. But I'm not able to find a way for after trying multiple ways. </p>
  
  <pre><code>var part = dataRDD.take(100)
  </code></pre>
  
  <p>part is an Array[String]</p>
  
  <p>I want to delete the 100 elements from the 100 of dataRDD.</p>
  
  <pre><code>var dataRDD = dataRDD.filter(row =&gt; row != part)
  </code></pre>
  
  <p>The above doesn't show any error but doesn't remove any rows. dataRDD still has the same 1000 rows.</p>
  
  <p>Can you please guide on how to get this work.</p>