use of com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKey in project honeycomb by altamiracorp.
the class HBaseTable method indexScanExact.
@Override
public Scanner indexScanExact(QueryKey key) {
final TableSchema schema = store.getSchema(tableId);
long indexId = store.getIndexId(tableId, key.getIndexName());
IndexRowKey row = IndexRowKeyBuilder.newBuilder(tableId, indexId).withQueryKey(key, schema).withSortOrder(SortOrder.Ascending).build();
// Scan is [start, end) : increment to set end to next possible row
return createScannerForRange(row.encode(), incrementRowKey(row.encode()));
}
use of com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKey in project honeycomb by altamiracorp.
the class HBaseTable method ascendingIndexScanAt.
@Override
public Scanner ascendingIndexScanAt(QueryKey key) {
final TableSchema schema = store.getSchema(tableId);
long indexId = store.getIndexId(tableId, key.getIndexName());
IndexRowKey startRow = IndexRowKeyBuilder.newBuilder(tableId, indexId).withQueryKey(key, schema).withSortOrder(SortOrder.Ascending).build();
IndexRowKey endRow = IndexRowKeyBuilder.newBuilder(tableId, indexId + 1).withSortOrder(SortOrder.Ascending).build();
return createScannerForRange(startRow.encode(), endRow.encode());
}
Aggregations