From f7ed654641589c40ced0efa8d8ad8a7acd869883 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Wed, 18 Mar 2015 15:40:27 -0700 Subject: [PATCH] Fix RocksJava test failure due to deprecation of table_cache_remove_scan_count_limit Summary: table_cache_remove_scan_count_limit is marked as deprecated in RocksDB C++. (see rocksdb/options.h). This patch made necessary changes on RocksJava side. Test Plan: make rocksdbjava -j32 make jtest Reviewers: rven, igor, fyrz, adamretter, ankgup87, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D35355 --- .../java/org/rocksdb/DBOptionsInterface.java | 6 ++++++ .../src/test/java/org/rocksdb/DBOptionsTest.java | 16 ---------------- java/src/test/java/org/rocksdb/OptionsTest.java | 16 ---------------- 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/java/src/main/java/org/rocksdb/DBOptionsInterface.java b/java/src/main/java/org/rocksdb/DBOptionsInterface.java index a3a71b2b7..a1cf178c1 100644 --- a/java/src/main/java/org/rocksdb/DBOptionsInterface.java +++ b/java/src/main/java/org/rocksdb/DBOptionsInterface.java @@ -519,7 +519,10 @@ public interface DBOptionsInterface { * * @param limit scan count limit * @return the instance of the current Object. + * + * @deprecated This function is depreciated. */ + @Deprecated Object setTableCacheRemoveScanCountLimit(int limit); /** @@ -532,7 +535,10 @@ public interface DBOptionsInterface { * order. * * @return scan count limit + * + * @deprecated This function is depreciated. */ + @Deprecated int tableCacheRemoveScanCountLimit(); /** diff --git a/java/src/test/java/org/rocksdb/DBOptionsTest.java b/java/src/test/java/org/rocksdb/DBOptionsTest.java index 9dab55955..5f8a8e34c 100644 --- a/java/src/test/java/org/rocksdb/DBOptionsTest.java +++ b/java/src/test/java/org/rocksdb/DBOptionsTest.java @@ -367,22 +367,6 @@ public class DBOptionsTest { } } - @Test - public void tableCacheRemoveScanCountLimit() { - DBOptions opt = null; - try { - opt = new DBOptions(); - int intValue = rand.nextInt(); - opt.setTableCacheRemoveScanCountLimit(intValue); - assertThat(opt.tableCacheRemoveScanCountLimit()). - isEqualTo(intValue); - } finally { - if (opt != null) { - opt.dispose(); - } - } - } - @Test public void walSizeLimitMB() { DBOptions opt = null; diff --git a/java/src/test/java/org/rocksdb/OptionsTest.java b/java/src/test/java/org/rocksdb/OptionsTest.java index 97da9cfb1..0c12be767 100644 --- a/java/src/test/java/org/rocksdb/OptionsTest.java +++ b/java/src/test/java/org/rocksdb/OptionsTest.java @@ -796,22 +796,6 @@ public class OptionsTest { } } - @Test - public void tableCacheRemoveScanCountLimit() { - Options opt = null; - try { - opt = new Options(); - int intValue = rand.nextInt(); - opt.setTableCacheRemoveScanCountLimit(intValue); - assertThat(opt.tableCacheRemoveScanCountLimit()). - isEqualTo(intValue); - } finally { - if (opt != null) { - opt.dispose(); - } - } - } - @Test public void walSizeLimitMB() { Options opt = null;