@Override
public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
try {
di.reset(b1, s1, l1);
final int x1 = WritableUtils.readVInt(di);
di.reset(b2, s2, l2);
final int x2 = WritableUtils.readVInt(di);
final int ret = (b1[s1 + x1] != b2[s2 + x2])
? b1[s1 + x1] - b2[s2 + x2]
: super.compare(b1, s1, x1, b2, s2, x2);
di.reset(reset, 0, 0);
return ret;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
GridmixKey.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:hadoop
作者:
评论列表
文章目录