Search in sources :

Example 1 with BitComparator

use of org.apache.hadoop.hbase.filter.BitComparator in project cdap by caskdata.

the class HBase96QueueConsumer method createStateFilter.

/**
 * Creates a HBase filter that will filter out rows with state column state = PROCESSED (ignoring transaction).
 */
private Filter createStateFilter() {
    byte[] processedMask = new byte[Ints.BYTES * 2 + 1];
    processedMask[processedMask.length - 1] = ConsumerEntryState.PROCESSED.getState();
    return new SingleColumnValueFilter(QueueEntryRow.COLUMN_FAMILY, stateColumnName, CompareFilter.CompareOp.NOT_EQUAL, new BitComparator(processedMask, BitComparator.BitwiseOp.AND));
}
Also used : SingleColumnValueFilter(org.apache.hadoop.hbase.filter.SingleColumnValueFilter) BitComparator(org.apache.hadoop.hbase.filter.BitComparator)

Example 2 with BitComparator

use of org.apache.hadoop.hbase.filter.BitComparator in project cdap by caskdata.

the class HBase11QueueConsumer method createStateFilter.

/**
 * Creates a HBase filter that will filter out rows with state column state = PROCESSED (ignoring transaction).
 */
private Filter createStateFilter() {
    byte[] processedMask = new byte[Ints.BYTES * 2 + 1];
    processedMask[processedMask.length - 1] = ConsumerEntryState.PROCESSED.getState();
    return new SingleColumnValueFilter(QueueEntryRow.COLUMN_FAMILY, stateColumnName, CompareFilter.CompareOp.NOT_EQUAL, new BitComparator(processedMask, BitComparator.BitwiseOp.AND));
}
Also used : SingleColumnValueFilter(org.apache.hadoop.hbase.filter.SingleColumnValueFilter) BitComparator(org.apache.hadoop.hbase.filter.BitComparator)

Example 3 with BitComparator

use of org.apache.hadoop.hbase.filter.BitComparator in project cdap by caskdata.

the class HBase10QueueConsumer method createStateFilter.

/**
 * Creates a HBase filter that will filter out rows with state column state = PROCESSED (ignoring transaction).
 */
private Filter createStateFilter() {
    byte[] processedMask = new byte[Ints.BYTES * 2 + 1];
    processedMask[processedMask.length - 1] = ConsumerEntryState.PROCESSED.getState();
    return new SingleColumnValueFilter(QueueEntryRow.COLUMN_FAMILY, stateColumnName, CompareFilter.CompareOp.NOT_EQUAL, new BitComparator(processedMask, BitComparator.BitwiseOp.AND));
}
Also used : SingleColumnValueFilter(org.apache.hadoop.hbase.filter.SingleColumnValueFilter) BitComparator(org.apache.hadoop.hbase.filter.BitComparator)

Example 4 with BitComparator

use of org.apache.hadoop.hbase.filter.BitComparator in project cdap by caskdata.

the class HBase12CDH570QueueConsumer method createStateFilter.

/**
 * Creates a HBase filter that will filter out rows with state column state = PROCESSED (ignoring transaction).
 */
private Filter createStateFilter() {
    byte[] processedMask = new byte[Ints.BYTES * 2 + 1];
    processedMask[processedMask.length - 1] = ConsumerEntryState.PROCESSED.getState();
    return new SingleColumnValueFilter(QueueEntryRow.COLUMN_FAMILY, stateColumnName, CompareFilter.CompareOp.NOT_EQUAL, new BitComparator(processedMask, BitComparator.BitwiseOp.AND));
}
Also used : SingleColumnValueFilter(org.apache.hadoop.hbase.filter.SingleColumnValueFilter) BitComparator(org.apache.hadoop.hbase.filter.BitComparator)

Example 5 with BitComparator

use of org.apache.hadoop.hbase.filter.BitComparator in project cdap by caskdata.

the class HBase98QueueConsumer method createStateFilter.

/**
 * Creates a HBase filter that will filter out rows with state column state = PROCESSED (ignoring transaction).
 */
private Filter createStateFilter() {
    byte[] processedMask = new byte[Ints.BYTES * 2 + 1];
    processedMask[processedMask.length - 1] = ConsumerEntryState.PROCESSED.getState();
    return new SingleColumnValueFilter(QueueEntryRow.COLUMN_FAMILY, stateColumnName, CompareFilter.CompareOp.NOT_EQUAL, new BitComparator(processedMask, BitComparator.BitwiseOp.AND));
}
Also used : SingleColumnValueFilter(org.apache.hadoop.hbase.filter.SingleColumnValueFilter) BitComparator(org.apache.hadoop.hbase.filter.BitComparator)

Aggregations

BitComparator (org.apache.hadoop.hbase.filter.BitComparator)7 SingleColumnValueFilter (org.apache.hadoop.hbase.filter.SingleColumnValueFilter)7