Jiayi-Liao commented on a change in pull request #17142:
URL: https://github.com/apache/flink/pull/17142#discussion_r702617343
##########
File path:
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/DefaultConfigurableOptionsFactory.java
##########
@@ -156,6 +160,24 @@ public ColumnFamilyOptions createColumnOptions(
blockBasedTableConfig.setBlockCacheSize(getBlockCacheSize());
}
+ if (isOptionConfigured(USE_BLOOM_FILTER)) {
+ final boolean enabled =
Boolean.parseBoolean(getInternal(USE_BLOOM_FILTER.key()));
+ if (enabled) {
+ final double bitsPerKey =
+ isOptionConfigured(BLOOM_FILTER_BITS_PER_KEY)
+ ?
Double.parseDouble(getInternal(BLOOM_FILTER_BITS_PER_KEY.key()))
+ : BLOOM_FILTER_BITS_PER_KEY.defaultValue();
+ final boolean useFullFilter =
+ isOptionConfigured(BLOOM_FILTER_USE_FULL_FILTER)
+ ? Boolean.parseBoolean(
+
getInternal(BLOOM_FILTER_USE_FULL_FILTER.key()))
+ : BLOOM_FILTER_USE_FULL_FILTER.defaultValue();
+ BloomFilter bloomFilter = new BloomFilter(bitsPerKey,
useFullFilter);
Review comment:
You're right... I don't why I mix them mistakenly yesterday :(.
To align with the method `public BloomFilter(final double bitsPerKey, final
boolean useBlockBasedMode)` in RocksDB, I'll use block-based option instead of
full filter option here.
--
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]