From 1966a7c055f6e182d627275051f5c09441aa922d Mon Sep 17 00:00:00 2001 From: ableegoldman Date: Fri, 12 Apr 2019 13:58:25 -0700 Subject: [PATCH] Expose JavaAPI for getting the filter policy of a BlockBasedTableConfig (#5186) Summary: I would like to be able to read out the current Filter that has been set (or not) for a BlockBasedTableConfig. Added one public method to BlockBasedTableConfig: public Filter filterPolicy() { return filterPolicy; } Pull Request resolved: https://github.com/facebook/rocksdb/pull/5186 Differential Revision: D14921415 Pulled By: siying fbshipit-source-id: 2a63c8685480197862b49fc48916c757cd6daf95 --- .../src/main/java/org/rocksdb/BlockBasedTableConfig.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/java/src/main/java/org/rocksdb/BlockBasedTableConfig.java b/java/src/main/java/org/rocksdb/BlockBasedTableConfig.java index 7a4ff14bf..4c88a0224 100644 --- a/java/src/main/java/org/rocksdb/BlockBasedTableConfig.java +++ b/java/src/main/java/org/rocksdb/BlockBasedTableConfig.java @@ -479,6 +479,15 @@ public class BlockBasedTableConfig extends TableFormatConfig { return this; } + /** + * Get the filter policy. + * + * @return the current filter policy. + */ + public Filter filterPolicy() { + return filterPolicy; + } + /** * Use the specified filter policy to reduce disk reads. *