title: How to pass one RDD in another RDD through .map
body: <p>I have two rdd's, and I want to do some computation on RDD2 items for each item of rdd1. So, I am passing RDD2 in a user defined function as below but I am getting error like <code>rdd1 cannot be passed in another rdd</code>. Can I know how to achieve this if I want to perform operations on two rdd's?</p>
  
  <p>For example:</p>
  
  <p><code>RDD1.map(line =&gt;function(line,RDD2))</code></p>