摘要:
来自:http://stackoverflow.com/questions/11130145/hadoop-multipleinputs-fails-with-classcastexceptionFollowing up on my comment, the Javadocs forTaggedIn... 阅读全文
摘要:
1 public class TopK extends Configured implements Tool { 2 3 public static class TopKMapper extends Mapper { 4 5 public static final int K = 100; 6 private TreeMap tm = new TreeMap(); 7 8 @Override 9 protected void map(Object key, Text value, Context context) ... 阅读全文
摘要:
1 public class GroupComparator implements RawComparator { 2 3 @Override 4 public int compare(MyBinaryKey o1, MyBinaryKey o2) { 5 return o1.toString().compareTo(o2.toString()); 6 } 7 8 @Override 9 public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {10 return Writabl... 阅读全文