版权声明:个人 https://blog.csdn.net/csdnmrliu/article/details/83306760
1. mapreduce中自定义mapout、reduceinput的key
key需实现WritableComparable<KEY> 接口
1.1 重写下面的三个方法
1.2 重写hashCode()和equals(Object obj)
2. mapreduce何时调用hashCode()、equals(Object obj)、compareTo(CustomCombineKey other)
2.1 compareTo(CustomCombineKey other)
spill(溢出)到磁盘时,会先进行一次快排,此时调用key的compareTo方法。