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:
parent
f39cbcb0a5
commit
f5d072ae6c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user