diff --git a/java/rocksjni/table.cc b/java/rocksjni/table.cc index c21501bb4..4d6114f18 100644 --- a/java/rocksjni/table.cc +++ b/java/rocksjni/table.cc @@ -17,9 +17,10 @@ jlong Java_org_rocksdb_PlainTableConfig_newTableFactoryHandle( JNIEnv* env, jobject jobj, jint jkey_size, jint jbloom_bits_per_key, jdouble jhash_table_ratio, jint jindex_sparseness) { - return reinterpret_cast(rocksdb::NewPlainTableFactory( - static_cast(jkey_size), - static_cast(jbloom_bits_per_key), - static_cast(jhash_table_ratio), - static_cast(jindex_sparseness))); + rocksdb::PlainTableOptions options = rocksdb::PlainTableOptions(); + options.user_key_len = jkey_size; + options.bloom_bits_per_key = jbloom_bits_per_key; + options.hash_table_ratio = jhash_table_ratio; + options.index_sparseness = jindex_sparseness; + return reinterpret_cast(rocksdb::NewPlainTableFactory(options)); }