@Override public HBaseQueueConsumer getQueueConsumer(ConsumerConfig consumerConfig, HTable hTable, QueueName queueName, HBaseConsumerState consumerState, HBaseConsumerStateStore stateStore) { return new HBase96QueueConsumer(consumerConfig, hTable, queueName, consumerState, stateStore); } }
HBase96QueueConsumer(ConsumerConfig consumerConfig, HTable hTable, QueueName queueName, HBaseConsumerState consumerState, HBaseConsumerStateStore stateStore) { super(consumerConfig, hTable, queueName, consumerState, stateStore); this.processedStateFilter = createStateFilter(); }
@Override protected Scan createScan(byte[] startRow, byte[] stopRow, int numRows) { // Scan the table for queue entries. Scan scan = new Scan(); // we should roughly divide by number of buckets, but don't want another RPC for the case we are not exactly right int caching = (int) (1.1 * numRows / HBaseQueueAdmin.ROW_KEY_DISTRIBUTION_BUCKETS); scan.setCaching(caching); scan.setStartRow(startRow); scan.setStopRow(stopRow); scan.addColumn(QueueEntryRow.COLUMN_FAMILY, QueueEntryRow.DATA_COLUMN); scan.addColumn(QueueEntryRow.COLUMN_FAMILY, QueueEntryRow.META_COLUMN); scan.addColumn(QueueEntryRow.COLUMN_FAMILY, stateColumnName); scan.setFilter(createFilter()); scan.setMaxVersions(1); return scan; }