/** * Creates a {@link RowRange} based on a prefix. This is similar to {@link Scan#setRowPrefixFilter(byte[])}. * @param prefix */ public void addRangeWithPrefix(byte[] prefix) { addRange(prefix, RowKeyUtil.calculateTheClosestNextRowKeyForPrefix(prefix)); }
/** * Creates a {@link RowRange} based on a prefix. This is similar to {@link Scan#setRowPrefixFilter(byte[])}. * @param prefix */ public void addRangeWithPrefix(byte[] prefix) { addRange(prefix, RowKeyUtil.calculateTheClosestNextRowKeyForPrefix(prefix)); }
/** * Adds a range to scan. This is similar to calling a combination of * {@link Scan#setStartRow(byte[])} and {@link Scan#setStopRow(byte[])}. Other ranges can be * constructed by creating a {@link RowRange} and calling {@link #addRange(RowRange)} * @param startRow * @param stopRow */ public void addRange(byte[] startRow, byte[] stopRow) { addRange(RowRange.newBuilder() .setStartKeyClosed(ByteStringer.wrap(startRow)) .setEndKeyOpen(ByteStringer.wrap(stopRow)) .build()); }
/** * Adds a range to scan. This is similar to calling a combination of * {@link Scan#setStartRow(byte[])} and {@link Scan#setStopRow(byte[])}. Other ranges can be * constructed by creating a {@link RowRange} and calling {@link #addRange(RowRange)} * @param startRow * @param stopRow */ public void addRange(byte[] startRow, byte[] stopRow) { addRange(RowRange.newBuilder() .setStartKeyClosed(ByteStringer.wrap(startRow)) .setEndKeyOpen(ByteStringer.wrap(stopRow)) .build()); }