From 017354177825355421a5f43d0c97e08c87ff6913 Mon Sep 17 00:00:00 2001 From: fyrz Date: Thu, 2 Oct 2014 13:33:18 +0200 Subject: [PATCH] FilterTest --- java/org/rocksdb/test/FilterTest.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 java/org/rocksdb/test/FilterTest.java diff --git a/java/org/rocksdb/test/FilterTest.java b/java/org/rocksdb/test/FilterTest.java new file mode 100644 index 000000000..7475d2c34 --- /dev/null +++ b/java/org/rocksdb/test/FilterTest.java @@ -0,0 +1,27 @@ +// Copyright (c) 2014, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. + +package org.rocksdb.test; + +import org.rocksdb.*; + +public class FilterTest { + static { + RocksDB.loadLibrary(); + } + public static void main(String[] args) { + Options options = new Options(); + // test table config without filter + BlockBasedTableConfig blockConfig = new BlockBasedTableConfig(); + options.setTableFormatConfig(blockConfig); + options.dispose(); + // new Bloom filter + options = new Options(); + blockConfig = new BlockBasedTableConfig(); + blockConfig.setFilter(new BloomFilter()); + options.setTableFormatConfig(blockConfig); + System.out.println("Filter test passed"); + } +}