public static class BigDecimalWritable.Comparator extends 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)
本方法是
RawComparator 的低效实现,如果能提供此方法的高效实现,请重载此方法. |
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)
WritableComparatorRawComparator 的低效实现,如果能提供此方法的高效实现,请重载此方法.
本方法的默认实现是:先通过 Writable.readFields(DataInput) 将二进制表示反序列化为
WritableComparable 对象,然后调用
WritableComparator.compare(WritableComparable, WritableComparable) 进行比较。
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.