假设我有一个名为kv
的column_family,并且我想向表中添加一个自定义属性new_attribute
,所以当我使用命令desc table kv
时它将显示如下:
CREATE TABLE ks1.kv (
k text PRIMARY KEY,
v text
) WITH bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND comment = ''
AND compaction = {'class': 'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE'
AND new_attribute = ***;
请注意最后一行。我想证明这一点。但是似乎在发出命令desc table kv
时,cqlsh不会将字符串发送到cassandra服务器。相反,它似乎从python cassandra库中获取结果。我应该如何让cqlsh支持呢? (假设我已经在cassandra服务器中实现了这样的属性)