Hello,
I tried to add the bloom filter functionality as mentioned here:
https://ci.apache.org/projects/flink/flink-docs-release-1.11/api/java/org/apache/flink/contrib/streaming/state/RocksDBOptionsFactory.html
<https://ci.apache.org/projects/flink/flink-docs-release-1.11/api/java/org/apache/flink/contrib/streaming/state/RocksDBOptionsFactory.html>
rocksDbBackend.setRocksDBOptions(new RocksDBOptionsFactory() {
public DBOptions createDBOptions(DBOptions currentOptions,
Collection<AutoCloseable> handlesToClose) {
return currentOptions.setMaxOpenFiles(1024);
}
public ColumnFamilyOptions createColumnOptions(ColumnFamilyOptions
currentOptions, Collection<AutoCloseable> handlesToClose) {
BloomFilter bloomFilter = new BloomFilter();
handlesToClose.add(bloomFilter);
return currentOptions
.setTableFormatConfig(
new
BlockBasedTableConfig().setFilter(bloomFilter));
}
});
This is in the main class where we setup in the StreamExecutionEnvironment …
I get ClassLoading errors due to that ...
Caused by: java.lang.LinkageError: loader constraint violation: loader
org.apache.flink.util.ChildFirstClassLoader @1169afe1 wants to load class
org.rocksdb.ColumnFamilyOptions. A different class with the same name was
previously loaded by 'app'. (org.rocksdb.ColumnFamilyOptions is in unnamed
module of loader 'app')
What is documented is to change the order to parent-first in the
flink-conf.yaml … but then I get different issues for the basic/core Spring
Framework classes not being serializable …
Any help will be appreciated.
Thanks,
Sandip