[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
This commit is contained in:
parent
37693704d6
commit
80a94d0517
@ -17,9 +17,10 @@
|
|||||||
jlong Java_org_rocksdb_PlainTableConfig_newTableFactoryHandle(
|
jlong Java_org_rocksdb_PlainTableConfig_newTableFactoryHandle(
|
||||||
JNIEnv* env, jobject jobj, jint jkey_size, jint jbloom_bits_per_key,
|
JNIEnv* env, jobject jobj, jint jkey_size, jint jbloom_bits_per_key,
|
||||||
jdouble jhash_table_ratio, jint jindex_sparseness) {
|
jdouble jhash_table_ratio, jint jindex_sparseness) {
|
||||||
return reinterpret_cast<jlong>(rocksdb::NewPlainTableFactory(
|
rocksdb::PlainTableOptions options = rocksdb::PlainTableOptions();
|
||||||
static_cast<uint32_t>(jkey_size),
|
options.user_key_len = jkey_size;
|
||||||
static_cast<int>(jbloom_bits_per_key),
|
options.bloom_bits_per_key = jbloom_bits_per_key;
|
||||||
static_cast<double>(jhash_table_ratio),
|
options.hash_table_ratio = jhash_table_ratio;
|
||||||
static_cast<size_t>(jindex_sparseness)));
|
options.index_sparseness = jindex_sparseness;
|
||||||
|
return reinterpret_cast<jlong>(rocksdb::NewPlainTableFactory(options));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user