MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / ColumnRangeFilter

Class ColumnRangeFilter

src/ColumnRangeFilter.java:39–161  ·  view source on GitHub ↗

Filters based on a range of column qualifiers. This filter is only compatible with HBase 0.92 and newer. @since 1.5

Source from the content-addressed store, hash-verified

37 * @since 1.5
38 */
39public final class ColumnRangeFilter extends ScanFilter {
40
41 private static final byte[] NAME = Bytes.ISO88591("org.apache.hadoop.hbase"
42 + ".filter.ColumnRangeFilter");
43
44 private final byte[] start_column;
45 private final boolean start_inclusive;
46 private final byte[] stop_column;
47 private final boolean stop_inclusive;
48
49 /**
50 * Constructor for UTF-8 strings.
51 * Equivalent to {@link #ColumnRangeFilter(byte[], boolean, byte[], boolean)
52 * ColumnRangeFilter}{@code (start_column, true, stop_inclusive, true)}
53 */
54 public ColumnRangeFilter(final String start_column, final String stop_column) {
55 this(Bytes.UTF8(start_column), true, Bytes.UTF8(stop_column), true);
56 }
57
58 /**
59 * Constructor.
60 * Equivalent to {@link #ColumnRangeFilter(byte[], boolean, byte[], boolean)
61 * ColumnRangeFilter}{@code (start_column, true, stop_inclusive, true)}
62 */
63 public ColumnRangeFilter(final byte[] start_column, final byte[] stop_column) {
64 this(start_column, true, stop_column, true);
65 }
66
67 /**
68 * Constructor for UTF-8 strings.
69 * @param start_column The column from which to start returning values.
70 * If {@code null}, start scanning from the beginning of the row.
71 * @param start_inclusive If {@code true}, the start column is inclusive.
72 * @param stop_column The column up to which to return values.
73 * If {@code null}, continue scanning until the end of the row.
74 * @param stop_inclusive If {@code true}, the stop column is inclusive.
75 */
76 public ColumnRangeFilter(final String start_column, final boolean start_inclusive,
77 final String stop_column, final boolean stop_inclusive) {
78 this(Bytes.UTF8(start_column), start_inclusive,
79 Bytes.UTF8(stop_column), stop_inclusive);
80 }
81
82 /**
83 * Constructor.
84 * @param start_column The column from which to start returning values.
85 * If {@code null}, start scanning from the beginning of the row.
86 * @param start_inclusive If {@code true}, the start column is inclusive.
87 * @param stop_column The column up to which to return values.
88 * If {@code null}, continue scanning until the end of the row.
89 * @param stop_inclusive If {@code true}, the stop column is inclusive.
90 */
91 public ColumnRangeFilter(final byte[] start_column, final boolean start_inclusive,
92 final byte[] stop_column, final boolean stop_inclusive) {
93 this.start_column = start_column;
94 this.start_inclusive = start_inclusive;
95 this.stop_column = stop_column;
96 this.stop_inclusive = stop_inclusive;

Callers

nothing calls this directly

Calls 1

ISO88591Method · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…