In Hadoop Secondary sort the code in Composite has the following method to compare values, the Composite key class implements WritableComparable :- @Override public int compareTo(CustomKey o) { int result = firstName.compareTo(o.getFirstName()); log.debug("value is " + result); if (result == 0) { return lastName.compareTo(o.getLastName()); } return result; } In the custom sorter that we create […]
The post Hadoop Secondary Sort Composite key compareTo VS Custom Sorter compare implementations appeared first on BlogoSfera.