How does Spark in Java compare two Keys when doing a join or groupWith? -


i trying following,

javapairrdd<jsonobject, jsonobject> rdd1 = .. javapairrdd<jsonobject, string> rdd2 = ..  javapairrdd<jsonobject, tuple2<iterable<string>, iterable<jsonobject>>>  groupedrdd = rdd1.groupwith(rdd2); 

but i'm not sure how spark compare 2 jsonobject keys.

more generally, how keys compared when doing join or groupwith?

it uses java .equals() method.

the thing equals() not implemented in jsonobject. use default java implementation compares object references.

the equals method class object implements discriminating possible equivalence relation on objects; is, non-null reference values x , y, method returns true if , if x , y refer same object (x == y has value true).


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -