@Test public void test() { byte[] key = new byte[1024]; int[] position = new int[slots.size()]; int offset = ScanUtil.setKey(schema, slots, position, bound, key, 0, 0, slots.size()); byte[] actualKey = new byte[offset]; System.arraycopy(key, 0, actualKey, 0, offset); assertArrayEquals(expectedKey, actualKey); }
public static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound, byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex) { return setKey(schema, slots, position, bound, key, byteOffset, slotStartIndex, slotEndIndex, slotStartIndex); }
ScanUtil { public static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound, byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex) { return setKey(schema, slots, position, bound, key, byteOffset, slotStartIndex, slotEndIndex, slotStartIndex); } }
ScanUtil { public static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound, byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex) { return setKey(schema, slots, position, bound, key, byteOffset, slotStartIndex, slotEndIndex, slotStartIndex); } private  ScanUtil(); }
ScanUtil { public static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound, byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex) { return setKey(schema, slots, position, bound, key, byteOffset, slotStartIndex, slotEndIndex, slotStartIndex); } private  ScanUtil(); static void setTenantId(Scan scan, byte[] tenantId); static ImmutableBytesWritable getTenantId(Scan scan); static Scan newScan(Scan scan); static boolean intersectScanRange(Scan scan, byte[] startKey, byte[] stopKey); static boolean intersectScanRange(Scan scan, byte[] startKey, byte[] stopKey, boolean useSkipScan); static void andFilterAtBeginning(Scan scan, Filter andWithFilter); static void andFilterAtEnd(Scan scan, Filter andWithFilter); static void setTimeRange(Scan scan, long ts); static byte[] getMinKey(RowKeySchema schema, List<List<KeyRange>> slots); static byte[] getMaxKey(RowKeySchema schema, List<List<KeyRange>> slots); static int estimateMaximumKeyLength(RowKeySchema schema, int schemaStartIndex, List<List<KeyRange>> slots); static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound,
            byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex); static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound,
            byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex, int schemaStartIndex); static boolean isAllSingleRowScan(List<List<KeyRange>> ranges, RowKeySchema schema); static int searchClosestKeyRangeWithUpperHigherThanPtr(List<KeyRange> slots, ImmutableBytesWritable ptr, int lower); static ScanRanges newScanRanges(List<Mutation> mutations); static byte[] nextKey(byte[] key, PTable table, ImmutableBytesWritable ptr); static void setReversed(Scan scan); static void swapStartStopRowIfReversed(Scan scan); static boolean isReversed(Scan scan); }
ScanUtil { public static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound, byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex) { return setKey(schema, slots, position, bound, key, byteOffset, slotStartIndex, slotEndIndex, slotStartIndex); } private  ScanUtil(); static void setTenantId(Scan scan, byte[] tenantId); static ImmutableBytesWritable getTenantId(Scan scan); static Scan newScan(Scan scan); static boolean intersectScanRange(Scan scan, byte[] startKey, byte[] stopKey); static boolean intersectScanRange(Scan scan, byte[] startKey, byte[] stopKey, boolean useSkipScan); static void andFilterAtBeginning(Scan scan, Filter andWithFilter); static void andFilterAtEnd(Scan scan, Filter andWithFilter); static void setTimeRange(Scan scan, long ts); static byte[] getMinKey(RowKeySchema schema, List<List<KeyRange>> slots); static byte[] getMaxKey(RowKeySchema schema, List<List<KeyRange>> slots); static int estimateMaximumKeyLength(RowKeySchema schema, int schemaStartIndex, List<List<KeyRange>> slots); static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound,
            byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex); static int setKey(RowKeySchema schema, List<List<KeyRange>> slots, int[] position, Bound bound,
            byte[] key, int byteOffset, int slotStartIndex, int slotEndIndex, int schemaStartIndex); static boolean isAllSingleRowScan(List<List<KeyRange>> ranges, RowKeySchema schema); static int searchClosestKeyRangeWithUpperHigherThanPtr(List<KeyRange> slots, ImmutableBytesWritable ptr, int lower); static ScanRanges newScanRanges(List<Mutation> mutations); static byte[] nextKey(byte[] key, PTable table, ImmutableBytesWritable ptr); static void setReversed(Scan scan); static void swapStartStopRowIfReversed(Scan scan); static boolean isReversed(Scan scan);  }