title: How does Spark in Java compare two Keys when doing a join or groupWith?
body: <p>I am trying to do the following,</p>
  
  <pre><code>JavaPairRDD&lt;JsonObject, JsonObject&gt; rdd1 = ..
  JavaPairRDD&lt;JsonObject, String&gt; rdd2 = .. 
  JavaPairRDD&lt;JsonObject, Tuple2&lt;Iterable&lt;String&gt;, Iterable&lt;JsonObject&gt;&gt;&gt; 
  groupedRDD = rdd1.groupWith(rdd2);
  </code></pre>
  
  <p>But I'm not sure how Spark will compare two JsonObject keys.  </p>
  
  <p>More generally, how are keys compared when doing a join or groupWith?</p>