use of com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKey in project honeycomb by altamiracorp.
the class HBaseTable method ascendingIndexScanAfter.
@Override
public Scanner ascendingIndexScanAfter(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(incrementRowKey(startRow.encode()), endRow.encode());
}
use of com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKey in project honeycomb by altamiracorp.
the class HBaseTable method descendingIndexScanBefore.
@Override
public Scanner descendingIndexScanBefore(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.Descending).build();
IndexRowKey endRow = IndexRowKeyBuilder.newBuilder(tableId, indexId + 1).withSortOrder(SortOrder.Descending).build();
return createScannerForRange(incrementRowKey(startRow.encode()), endRow.encode());
}
use of com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKey in project honeycomb by altamiracorp.
the class HBaseTable method descendingIndexScan.
@Override
public Scanner descendingIndexScan(QueryKey key) {
long indexId = store.getIndexId(tableId, key.getIndexName());
IndexRowKey startRow = IndexRowKeyBuilder.newBuilder(tableId, indexId).withSortOrder(SortOrder.Descending).build();
IndexRowKey endRow = IndexRowKeyBuilder.newBuilder(tableId, indexId + 1).withSortOrder(SortOrder.Descending).build();
return createScannerForRange(startRow.encode(), endRow.encode());
}
use of com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKey in project honeycomb by altamiracorp.
the class HBaseTable method descendingIndexScanAt.
@Override
public Scanner descendingIndexScanAt(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.Descending).build();
IndexRowKey endRow = IndexRowKeyBuilder.newBuilder(tableId, indexId + 1).withSortOrder(SortOrder.Descending).build();
return createScannerForRange(startRow.encode(), endRow.encode());
}
use of com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKey in project honeycomb by altamiracorp.
the class HBaseTable method ascendingIndexScan.
@Override
public Scanner ascendingIndexScan(QueryKey key) {
long indexId = store.getIndexId(tableId, key.getIndexName());
IndexRowKey startRow = IndexRowKeyBuilder.newBuilder(tableId, indexId).withSortOrder(SortOrder.Ascending).build();
IndexRowKey endRow = IndexRowKeyBuilder.newBuilder(tableId, indexId + 1).withSortOrder(SortOrder.Ascending).build();
return createScannerForRange(startRow.encode(), endRow.encode());
}
Aggregations