title: How to join two RDDs in spark with python?
body: <p>Suppose </p>
  
  <pre><code>rdd1 = ( (a, 1), (a, 2), (b, 1) ),
  rdd2 = ( (a, ?), (a, *), (c, .) ).
  </code></pre>
  
  <p>Want to generate </p>
  
  <pre><code>( (a, (1, ?)), (a, (1, *)), (a, (2, ?)), (a, (2, *)) ).
  </code></pre>
  
  <p>Any easy methods?
  I think it is different from the cross join but can't find a good solution.
  My solution is  </p>
  
  <pre><code>(rdd1
   .cartesian( rdd2 )
   .filter( lambda (k, v): k[0]==v[0] )
   .map( lambda (k, v): (k[0], (k[1], v[1])) ))
  </code></pre>