【发布时间】:2014-02-03 13:09:37
【问题描述】:
我将列族 gcgraceseconds 设置为 0; 但是仍然没有删除行键它仍然在我的列族中
create column family workInfo123
with column_type = 'Standard'
and comparator = 'UTF8Type'
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type'
and read_repair_chance = 0.1
and dclocal_read_repair_chance = 0.0
and populate_io_cache_on_flush = true
and gc_grace = 0
and min_compaction_threshold = 4
and max_compaction_threshold = 32
and replicate_on_write = true
and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
and caching = 'KEYS_ONLY'
and default_time_to_live = 0
and speculative_retry = 'NONE'
and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor'}
and index_interval = 128;
见下图
[default@winoriatest] list workInfo123;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: a
-------------------
RowKey: xx
2 Rows Returned.
Elapsed time: 17 msec(s).
我正在使用 cassandra -cli 我应该改变什么吗
更新:-
使用./nodetool -host 127.0.0.1 compact后
[default@winoriatest] list workInfo123;
Using default limit of 100
Using default cell limit of 100
-------------------
RowKey: xx
2 Rows Returned.
Elapsed time: 11 msec(s).
为什么xx 仍然存在??
【问题讨论】:
-
所以key还是出现了,但是删除行后列就没了?运行
nodetool flush <keyspace> <cf>和nodetool compact <keyspace> <cf>后行是否完全消失? -
nodetool是<cassandra_home>/bin中自己的程序。这不是cassandra-cli命令。 -
@Ralf
./nodetool flush winoriatest workInfo123和./nodetool -host 127.0.0.1 compact压缩表,但rowkey xx仍然存在,但rowkey a消失了。rowkey a比rowkey xx早三到四天是因为这个吗?? -
插入数据后是否更改了gc宽限期?
标签: nosql cassandra cassandra-cli column-family row-key