Search in sources :

Example 1 with CType

use of org.apache.cassandra.db.composites.CType in project stargate-core by tuplejump.

the class RowIndexSupport method addPartitionKeyFields.

private void addPartitionKeyFields(ByteBuffer rowKey, long timestamp, IndexEntryBuilder builder) {
    CType keyCType = tableMapper.cfMetaData.getKeyValidatorAsCType();
    Composite compoundRowKey = keyCType.fromByteBuffer(rowKey);
    for (Map.Entry<String, ColumnDefinition> entry : options.partitionKeysIndexed.entrySet()) {
        ByteBuffer value = compoundRowKey.get(entry.getValue().position());
        addKeyField(timestamp, entry, value, builder);
    }
}
Also used : Composite(org.apache.cassandra.db.composites.Composite) CType(org.apache.cassandra.db.composites.CType) ByteBuffer(java.nio.ByteBuffer) ColumnDefinition(org.apache.cassandra.config.ColumnDefinition)

Aggregations

ByteBuffer (java.nio.ByteBuffer)1 ColumnDefinition (org.apache.cassandra.config.ColumnDefinition)1 CType (org.apache.cassandra.db.composites.CType)1 Composite (org.apache.cassandra.db.composites.Composite)1