Fixed RocksJava test failure of shouldSetTestCappedPrefixExtractor

Summary:
Fixed RocksJava test failure of shouldSetTestCappedPrefixExtractor
by adding the missing native implementation of
useCappedPrefixExtractor.

Test Plan:
make jclean
make rocksdbjava -j32
make jtest

Reviewers: igor, anthony, IslamAbdelRahman, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D43551
This commit is contained in:
Yueh-Hsuan Chiang 2015-08-04 17:01:08 -07:00
parent f39cbcb0a5
commit f5d072ae6c

View File

@ -2147,6 +2147,17 @@ void Java_org_rocksdb_ColumnFamilyOptions_useFixedLengthPrefixExtractor(
static_cast<int>(jprefix_length)));
}
/*
* Method: useCappedPrefixExtractor
* Signature: (JI)V
*/
void Java_org_rocksdb_ColumnFamilyOptions_useCappedPrefixExtractor(
JNIEnv* env, jobject jobj, jlong jhandle, jint jprefix_length) {
reinterpret_cast<rocksdb::ColumnFamilyOptions*>(jhandle)->
prefix_extractor.reset(rocksdb::NewCappedPrefixTransform(
static_cast<int>(jprefix_length)));
}
/*
* Method: setTableFactory
* Signature: (JJ)V