墓石圧縮について
cassandra1.2.6 で「トゥームストーンの圧縮」ができない理由を知りたいです。
【歩数】
cassandra-cli で列ファミリーを作成する
create keyspace keyspace1 with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:3};
use keyspace1;
create column family cf1 with comparator=AsciiType and default_validation_class=AsciiType and key_validation_class=AsciiType and compaction_strategy_options={tombstone_compaction_interval: 1, tombstone_threshold: '0.1'} and gc_grace=600 and column_metadata=[ {column_name: column1, validation_class: LongType} ];
次のように、cassandra-cli で TTL を使用していくつかのデータを入力します。
set cf1['key1']['column1']=100 with ttl = 1;
set cf1['key2']['column1']=200 with ttl = 1;
set cf1['key3']['column1']=300 with ttl = 1;
set cf1['key4']['column1']=400 with ttl = 600;
set cf1['key5']['column1']=500 with ttl = 600;
set cf1['key6']['column1']=600 with ttl = 600;「nodetool フラッシュ」を実行します
sstable2jsonでData.dbをチェック
{"key": "2412441","columns": [["column1","100",1373516242953000,"d"]]},
{"key": "2412442","columns": [["column1","200",1373516242963000,"d"]]},
{"key": "2412443","columns": [["column1","300",1373516242973000,"d"]]},
{"key": "2412444","columns": [["column1","400",1373516242983000,"e",600,1373516300]]},
{"key": "2412445","columns": [["column1","500",1373516242983000,"e",600,1373516300]]},
{"key": "2412446","columns": [["column1","600",1373516242983000,"e",600,1373516300]]}1時間以上待ちます....Data.dbに変更はありません....トゥームストーンの圧縮は行われませんでした...
いくつかのデータを入力して、nodetool flush を再度実行します...ちょうど新しい Data.db が作成されました... tombstone の圧縮は生成されませんでした...
「墓石の圧縮」を試してみたいと思います。