[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:
Yueh-Hsuan Chiang 2014-07-21 09:19:28 -07:00
parent 37693704d6
commit 80a94d0517

View File

@ -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));
}