public static class BytesWritable.Comparator extends WritableComparator
WritableComparator 自然顺序实现(升序).| Constructor and Description |
|---|
Comparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2)
基于二进制内容的 LongWritable 对象比较函数.
|
compare, compare, compareBytes, define, get, getKeyClass, hashBytes, newKey, readDouble, readFloat, readInt, readLong, readUnsignedShort, readVInt, readVLongequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic int compare(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2)
直接使用 WritableComparator.compareBytes(byte[], int, int, byte[], int, int) 进行二进制内容的比较
compare in interface RawComparatorcompare in class WritableComparatorb1 - 对象1二进制内容所在的byte数组s1 - 对象1二进制内容在b1的起始位置l1 - 对象1二进制内容长度b2 - 对象2二进制内容所在的byte数组s2 - 对象2二进制内容在b2的起始位置l2 - 对象2二进制内容长度Copyright © 2023 Alibaba Cloud Computing. All rights reserved.