Adds the ability to use uncompressed chunks in compressed files
Triggered when size of compressed data surpasses a configurable
threshold.
Patch by Branimir Lambov;
@@ -847,7 +847,25 @@ VALUES (4, blobAsInt(0x), '', blobAsBigint(0x), 0x, blobAsBoolean(0x), blobAsDec
PRIMARY KEY (id, col)
"""
- if self.cluster.version() >= LooseVersion('3.9'):
+ if self.cluster.version() >= LooseVersion('4.0'):
+ ret += """
+ ) WITH CLUSTERING ORDER BY (col ASC)
+ AND bloom_filter_fp_chance = 0.01
+ AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
+ AND comment = ''
+ AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
+ AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor', 'min_compress_ratio': '1.1'}
+ 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 = '99PERCENTILE';
+ """
+ elif self.cluster.version() >= LooseVersion('3.9'):
ret += """
) WITH CLUSTERING ORDER BY (col ASC)
AND bloom_filter_fp_chance = 0.01
@@ -913,7 +931,29 @@ VALUES (4, blobAsInt(0x), '', blobAsBigint(0x), 0x, blobAsBoolean(0x), blobAsDec
return ret + "\n" + col_idx_def
def get_users_table_output(self):
- if self.cluster.version() >= LooseVersion('3.9'):
+ if self.cluster.version() >= LooseVersion('4.0'):
+ return """
+ CREATE TABLE test.users (
+ userid text PRIMARY KEY,
+ age int,
+ firstname text,
+ lastname text
+ ) WITH bloom_filter_fp_chance = 0.01
+ AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
+ AND comment = ''
+ AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
+ AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor', 'min_compress_ratio': '1.1'}
+ 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 = '99PERCENTILE';
+ """ + self.get_index_output('myindex', 'test', 'users', 'age')
+ elif self.cluster.version() >= LooseVersion('3.9'):
return """
CREATE TABLE test.users (
userid text PRIMARY KEY,
