.append('\''); and(sb, formatted).append("compaction = ").append(formatOptionMap(options.getCompaction())); and(sb, formatted).append("compression = ").append(formatOptionMap(options.getCompression())); if (cassandraVersion.getMajor() >= 2) { and(sb, formatted).append("default_time_to_live = ").append(options.getDefaultTimeToLive());
assertThat(table.getOptions().getCompression()) .contains(entry("class", "org.apache.cassandra.io.compress.DeflateCompressor")) .contains(entry("chunk_length_in_kb", "128"));
.contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy")); assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15")); assertThat(table.getOptions().getCompression()) .contains( entry( assertThat(table.getOptions().getCompression()) .contains(entry("chunk_length_in_kb", "128")); // note the "in" prefix assertThat(table.getOptions().getDefaultTimeToLive()).isEqualTo(0); .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy")); assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15")); assertThat(table.getOptions().getCompression()) .contains( entry( assertThat(table.getOptions().getCompression()) .contains(entry("chunk_length_in_kb", "128")); // note the "in" prefix assertThat(table.getOptions().getDefaultTimeToLive()).isEqualTo(0); .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy")); assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15")); assertThat(table.getOptions().getCompression()) .contains( entry("sstable_compression", "org.apache.cassandra.io.compress.SnappyCompressor")); assertThat(table.getOptions().getCompression()).contains(entry("chunk_length_kb", "128")); assertThat(table.getOptions().getDefaultTimeToLive()).isEqualTo(0); assertThat(table.getOptions().getSpeculativeRetry()).isEqualTo("99.0PERCENTILE");
and(sb, formatted).append("comment = '").append(options.getComment().replace("'", "''")).append('\''); and(sb, formatted).append("compaction = ").append(formatOptionMap(options.getCompaction())); and(sb, formatted).append("compression = ").append(formatOptionMap(options.getCompression())); if (cassandraVersion.getMajor() >= 2) { and(sb, formatted).append("default_time_to_live = ").append(options.getDefaultTimeToLive());
and(sb, formatted).append("comment = '").append(options.getComment().replace("'", "''")).append('\''); and(sb, formatted).append("compaction = ").append(formatOptionMap(options.getCompaction())); and(sb, formatted).append("compression = ").append(formatOptionMap(options.getCompression())); if (cassandraVersion.getMajor() >= 2) { and(sb, formatted).append("default_time_to_live = ").append(options.getDefaultTimeToLive());
and(sb, formatted).append("comment = '").append(options.getComment().replace("'", "''")).append('\''); and(sb, formatted).append("compaction = ").append(formatOptionMap(options.getCompaction())); and(sb, formatted).append("compression = ").append(formatOptionMap(options.getCompression())); if (cassandraVersion.getMajor() >= 2) { and(sb, formatted).append("default_time_to_live = ").append(options.getDefaultTimeToLive());
Map<String, String> getCompressionOptions(final String name) throws BackendException { final KeyspaceMetadata keyspaceMetadata = Option.of(this.cluster.getMetadata().getKeyspace(this.keyspace)) .getOrElseThrow(() -> new PermanentBackendException(String.format("Unknown keyspace '%s'", this.keyspace))); return Option.of(keyspaceMetadata.getTable(name)) .map(tableMetadata -> tableMetadata.getOptions().getCompression()) .getOrElseThrow(() -> new PermanentBackendException(String.format("Unknown table '%s'", name))); }
assertThat(table.getOptions().getCompression()) .contains(entry("class", "org.apache.cassandra.io.compress.DeflateCompressor")) .contains(entry("chunk_length_in_kb", "128"));
.contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy")); assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15")); assertThat(table.getOptions().getCompression()) .contains( entry( assertThat(table.getOptions().getCompression()) .contains(entry("chunk_length_in_kb", "128")); // note the "in" prefix assertThat(table.getOptions().getDefaultTimeToLive()).isEqualTo(0); .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy")); assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15")); assertThat(table.getOptions().getCompression()) .contains( entry( assertThat(table.getOptions().getCompression()) .contains(entry("chunk_length_in_kb", "128")); // note the "in" prefix assertThat(table.getOptions().getDefaultTimeToLive()).isEqualTo(0); .contains(entry("class", "org.apache.cassandra.db.compaction.LeveledCompactionStrategy")); assertThat(table.getOptions().getCompaction()).contains(entry("sstable_size_in_mb", "15")); assertThat(table.getOptions().getCompression()) .contains( entry("sstable_compression", "org.apache.cassandra.io.compress.SnappyCompressor")); assertThat(table.getOptions().getCompression()).contains(entry("chunk_length_kb", "128")); assertThat(table.getOptions().getDefaultTimeToLive()).isEqualTo(0); assertThat(table.getOptions().getSpeculativeRetry()).isEqualTo("99.0PERCENTILE");