pnowojski commented on code in PR #24072: URL: https://github.com/apache/flink/pull/24072#discussion_r1455150026
########## flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBConfigurableOptions.java: ########## @@ -149,24 +144,42 @@ public class RocksDBConfigurableOptions implements Serializable { NONE.name(), LEVEL.name())); - public static final ConfigOption<CompressionType> COMPRESSION_TYPE = - key("state.backend.rocksdb.compression.type") + public static final ConfigOption<List<CompressionType>> COMPRESSION_PER_LEVEL = + key("state.backend.rocksdb.compression.per.level") .enumType(CompressionType.class) - .defaultValue(SNAPPY_COMPRESSION) + .asList() + .defaultValues(SNAPPY_COMPRESSION) .withDescription( - String.format( - "The specified compression type for DB. Candidate compression type is %s, %s, %s, %s, %s, " - + "%s, %s, %s or %s, and RocksDB choose '%s' as default style.", - NO_COMPRESSION.name(), - SNAPPY_COMPRESSION.name(), - ZLIB_COMPRESSION.name(), - BZLIB2_COMPRESSION.name(), - LZ4_COMPRESSION.name(), - LZ4HC_COMPRESSION.name(), - XPRESS_COMPRESSION.name(), - ZSTD_COMPRESSION.name(), - DISABLE_COMPRESSION_OPTION.name(), - SNAPPY_COMPRESSION.name())); + Description.builder() + .text( + "A semicolon-separated list of Compression Type. Different levels can have different " + + "compression policies. In many cases, lower levels use fast compression algorithms," + + " while higher levels with more data use slower but more effective compression algorithms. " + + "If the COMPRESSION_PER_LEVEL list is not empty, it should have an entry for each level of the database, " + + "When level_compaction_dynamic_level_bytes=true, compression_per_level[0] still determines L0, but other " Review Comment: What is `level_compaction_dynamic_level_bytes`? ########## flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBConfigurableOptions.java: ########## @@ -149,24 +144,42 @@ public class RocksDBConfigurableOptions implements Serializable { NONE.name(), LEVEL.name())); - public static final ConfigOption<CompressionType> COMPRESSION_TYPE = - key("state.backend.rocksdb.compression.type") + public static final ConfigOption<List<CompressionType>> COMPRESSION_PER_LEVEL = + key("state.backend.rocksdb.compression.per.level") .enumType(CompressionType.class) - .defaultValue(SNAPPY_COMPRESSION) + .asList() + .defaultValues(SNAPPY_COMPRESSION) .withDescription( - String.format( - "The specified compression type for DB. Candidate compression type is %s, %s, %s, %s, %s, " - + "%s, %s, %s or %s, and RocksDB choose '%s' as default style.", - NO_COMPRESSION.name(), - SNAPPY_COMPRESSION.name(), - ZLIB_COMPRESSION.name(), - BZLIB2_COMPRESSION.name(), - LZ4_COMPRESSION.name(), - LZ4HC_COMPRESSION.name(), - XPRESS_COMPRESSION.name(), - ZSTD_COMPRESSION.name(), - DISABLE_COMPRESSION_OPTION.name(), - SNAPPY_COMPRESSION.name())); + Description.builder() + .text( + "A semicolon-separated list of Compression Type. Different levels can have different " + + "compression policies. In many cases, lower levels use fast compression algorithms," + + " while higher levels with more data use slower but more effective compression algorithms. " + + "If the COMPRESSION_PER_LEVEL list is not empty, it should have an entry for each level of the database, " Review Comment: > it should have an entry for each level of the database That's not true, isn't it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org