Myasuka commented on a change in pull request #17142:
URL: https://github.com/apache/flink/pull/17142#discussion_r702612363
##########
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:
I'm afraid that you misundstand the parameters of `BloomFilter`. The 2nd
parameter means whether is block-based filter. If it sets as true, it will
generate block-based filter instead of full filter.
--
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]