use of org.apache.hadoop.hbase.filter.SingleColumnValueFilter in project cdap by caskdata.
the class HBase10CDH550QueueConsumer 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));
}
Aggregations