Search in sources :

Example 1 with IndexRowKeyBuilder

use of com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKeyBuilder in project honeycomb by altamiracorp.

the class MutationFactory method doToIndices.

private void doToIndices(long tableId, final Row row, final Collection<IndexSchema> indices, final IndexAction action) {
    for (IndexSchema index : indices) {
        long indexId = store.getIndexId(tableId, index.getIndexName());
        TableSchema schema = store.getSchema(tableId);
        IndexRowKeyBuilder builder = IndexRowKeyBuilder.newBuilder(tableId, indexId).withUUID(row.getUUID()).withRow(row, index.getIndexName(), schema);
        action.execute(builder);
    }
}
Also used : IndexRowKeyBuilder(com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKeyBuilder) TableSchema(com.nearinfinity.honeycomb.mysql.schema.TableSchema) IndexSchema(com.nearinfinity.honeycomb.mysql.schema.IndexSchema)

Aggregations

IndexRowKeyBuilder (com.nearinfinity.honeycomb.hbase.rowkey.IndexRowKeyBuilder)1 IndexSchema (com.nearinfinity.honeycomb.mysql.schema.IndexSchema)1 TableSchema (com.nearinfinity.honeycomb.mysql.schema.TableSchema)1