Hello,
I need to shard a counter column family by using a secondary index. I am stuck with what to provide for the column name.
Here's the CLI ...
create column family user_counts
with column_type = 'Standard'
and comparator = 'UTF8Type'
and default_validation_class = 'CounterColumnType'
and key_validation_class = 'LongType'
and column_metadata=[{column_name:shard, validation_class:AsciiType, index_type:KEYS}]
and rows_cached = 0.0
and row_cache_save_period = 0
and row_cache_keys_to_save = 2147483647
and keys_cached = 200000.0
and key_cache_save_period = 14400
and read_repair_chance = 1.0
and gc_grace = 864000
and min_compaction_threshold = 4
and max_compaction_threshold = 32
and replicate_on_write = true
and row_cache_provider = 'ConcurrentLinkedHashCacheProvider'
and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
and comment = 'Per user counts for various purposes';
When I try to run the above command in CLI thus ...
$ bin/cassandra-cli -h localhost -f schema.cli # schema.cli has above command in it
I get ...
Line 9 => Cannot add a non counter column (shard) in a counter column family
How to overcome? What name can I provide for the column name?
Thanks
Naga Vijay
