何时实施 WritableComparable 以及何时扩展 WritableComparator
When to implement WritableComparable and when to extend WritableComparator
刚开始探索 mapreduce,我遇到了具有 compareTo() 方法的 Writablecomparable 接口和具有 compare() 方法的 Writablecomparator,当我们编写自己的 Custom Writable 类 时,应该在下面使用如果我们实现自己的排序机制,在什么情况下?
刚开始探索 mapreduce,我遇到了具有 compareTo() 方法的 Writablecomparable 接口和具有 compare() 方法的 Writablecomparator,当我们编写自己的 Custom Writable 类 时,应该在下面使用如果我们实现自己的排序机制,在什么情况下?