public class ByteRowKeyComparator extends Object implements Comparator<byte[]>
RowKey.key
instances.
Comparison logic in this class is very similar to FrameComparisonWidget
, but is different because it works
on byte[] instead of Frames.Modifier and Type | Method and Description |
---|---|
int |
compare(byte[] keyArray1,
byte[] keyArray2) |
static int[] |
computeAscDescRunLengths(List<KeyColumn> keyColumns)
Given a list of sort columns, compute an array of the number of ascending fields in a run, followed by number of
descending fields in a run, followed by ascending, etc.
|
static int |
computeFirstFieldPosition(int fieldCount)
Compute the offset into each key where the first field starts.
|
static ByteRowKeyComparator |
create(List<KeyColumn> keyColumns) |
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static ByteRowKeyComparator create(List<KeyColumn> keyColumns)
public static int computeFirstFieldPosition(int fieldCount)
FrameComparisonWidgetImpl
can use it.public static int[] computeAscDescRunLengths(List<KeyColumn> keyColumns)
FrameComparisonWidgetImpl
can use it.public int compare(byte[] keyArray1, byte[] keyArray2)
compare
in interface Comparator<byte[]>
public boolean equals(Object o)
equals
in interface Comparator<byte[]>
equals
in class Object
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.