The Comparison interface allows specific underlying type mechanisms to additionally return relevant
Comparator
implementations when required internally.
In the case of Hadoop,
Serialization
implementations that present
alternative serialization implementations for custom types manged by
Tuple
s should also
implement the
getComparator(Class)
method.
During runtime Cascading can identify and use the correct Comparator during grouping operations if it was
not given explicitly on the
Fields.setComparator(Comparable, java.util.Comparator)
family of methods.
See the class
BytesSerialization
for an example.
see cascading.tuple.hadoop.BytesSerialization