mayuehappy commented on code in PR #24072:
URL: https://github.com/apache/flink/pull/24072#discussion_r1455112632
##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBConfigurableOptions.java:
##########
@@ -139,6 +149,25 @@ public class RocksDBConfigurableOptions implements
Serializable {
NONE.name(),
LEVEL.name()));
+ public static final ConfigOption<CompressionType> COMPRESSION_TYPE =
Review Comment:
@pnowojski @masteryhx thanks for suggestion . After I read the related
documentation and code. I think maybe we can just use the API `public
ColumnFamilyOptions setCompressionPerLevel(
final List<CompressionType> compressionLevels)` directly. We can pass
in a List of CompressionType to represent different levels of Compression Style.
https://github.com/facebook/rocksdb/blob/65e162bf09e6d81d5de533539753d80c008717fd/include/rocksdb/advanced_options.h#L399C1-L426C5
> // NOTE: if the vector size is smaller than the level number, the
undefined
> // lower level uses the last option in the vector, for example, for 3
level
> // LSM tree the following settings are the same:
> // {kNoCompression, kSnappyCompression}
> // {kNoCompression, kSnappyCompression, kSnappyCompression}
It can be seen that the effect of using this parameter directly is actually
the same as @pnowojski 's idea. So it seems that we do not need to rename
parameter name to `rocksdb.compression.types` but directly use the following
parameters `state.backend.rocksdb.compression.per.level`.
I have updated the pr. Please comment if you have any other suggestions.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]