提交 80a94d05 编写于 作者: Y Yueh-Hsuan Chiang

[Java] Fixed the Java compilation error caused by PlainTableFactory API change.

Summary: Fixed the Java compilation error caused by PlainTableFactory API change.

Test Plan:
make rocksdbjava
make jdb_bench
cd java;./jdb_bench.sh

Reviewers: sdong, ljin, ankgup87, swapnilghike, zzbennett, rsumbaly, igor

Reviewed By: igor

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D20295
上级 37693704
......@@ -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<jlong>(rocksdb::NewPlainTableFactory(
static_cast<uint32_t>(jkey_size),
static_cast<int>(jbloom_bits_per_key),
static_cast<double>(jhash_table_ratio),
static_cast<size_t>(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<jlong>(rocksdb::NewPlainTableFactory(options));
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册