From fd98fdd3202c38e4ae73168884406a4a07269a71 Mon Sep 17 00:00:00 2001 From: ayulas <107927247+ayulas@users.noreply.github.com> Date: Sun, 20 Aug 2023 14:10:57 +0300 Subject: [PATCH] Spdb memtable: Fix typo in memtableTest in java (#647) --- java/rocksjni/memtablejni.cc | 1 - java/src/main/java/org/rocksdb/HashSpdbMemTableConfig.java | 7 +++++++ java/src/test/java/org/rocksdb/MemTableTest.java | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/java/rocksjni/memtablejni.cc b/java/rocksjni/memtablejni.cc index 9f57c91187..f0c69c3e9f 100644 --- a/java/rocksjni/memtablejni.cc +++ b/java/rocksjni/memtablejni.cc @@ -36,7 +36,6 @@ jlong Java_org_rocksdb_HashSkipListMemTableConfig_newMemTableFactoryHandle( /* * Class: org_rocksdb_HashSpdbMemTableConfig * Method: newMemTableFactoryHandle - * Signature: (JII)J */ jlong Java_org_rocksdb_HashSpdbMemTableConfig_newMemTableFactoryHandle( JNIEnv* env, jobject /*jobj*/, jlong jbucket_count) { diff --git a/java/src/main/java/org/rocksdb/HashSpdbMemTableConfig.java b/java/src/main/java/org/rocksdb/HashSpdbMemTableConfig.java index 63d55807ae..875fd095b5 100644 --- a/java/src/main/java/org/rocksdb/HashSpdbMemTableConfig.java +++ b/java/src/main/java/org/rocksdb/HashSpdbMemTableConfig.java @@ -27,6 +27,13 @@ public HashSpdbMemTableConfig setBucketCount(final long count) { return this; } + /** + * @return the number of hash buckets + */ + public long bucketCount() { + return bucketCount_; + } + @Override protected long newMemTableFactoryHandle() { return newMemTableFactoryHandle(bucketCount_); diff --git a/java/src/test/java/org/rocksdb/MemTableTest.java b/java/src/test/java/org/rocksdb/MemTableTest.java index 13d4fd1e5d..c2d2fc4b08 100644 --- a/java/src/test/java/org/rocksdb/MemTableTest.java +++ b/java/src/test/java/org/rocksdb/MemTableTest.java @@ -48,12 +48,6 @@ public void hashSpdbMemTable() throws RocksDBException { assertThat(memTableConfig.bucketCount()).isEqualTo(1000000); memTableConfig.setBucketCount(2000000); assertThat(memTableConfig.bucketCount()).isEqualTo(2000000); - assertThat(memTableConfig.height()).isEqualTo(4); - memTableConfig.setHeight(5); - assertThat(memTableConfig.height()).isEqualTo(5); - assertThat(memTableConfig.branchingFactor()).isEqualTo(4); - memTableConfig.setBranchingFactor(6); - assertThat(memTableConfig.branchingFactor()).isEqualTo(6); options.setMemTableConfig(memTableConfig); } }