public abstract class RecordComparator extends WritableComparator
限定符 | 构造器和说明 |
---|---|
protected |
RecordComparator(Class<? extends WritableComparable> recordClass)
Construct a raw
Record comparison implementation. |
限定符和类型 | 方法和说明 |
---|---|
abstract int |
compare(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2)
Optimization hook.
|
static void |
define(Class c,
RecordComparator comparator)
Register an optimized comparator for a
Record implementation. |
compare, compare, compareBytes, define, get, getKeyClass, hashBytes, hashBytes, newKey, readDouble, readFloat, readInt, readLong, readUnsignedShort, readVInt, readVLong
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
protected RecordComparator(Class<? extends WritableComparable> recordClass)
Record
comparison implementation.public abstract int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
WritableComparator
The default implementation reads the data into two WritableComparable
s (using Writable.readFields(DataInput)
, then calls WritableComparator.compare(WritableComparable,WritableComparable)
.
compare
在接口中 RawComparator
compare
在类中 WritableComparator
public static void define(Class c, RecordComparator comparator)
Record
implementation.c
- record classs for which a raw comparator is providedcomparator
- Raw comparator instance for class cCopyright © 2009 The Apache Software Foundation