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
main
Yueh-Hsuan Chiang 10 years ago
parent f39cbcb0a5
commit f5d072ae6c
  1. 11
      java/rocksjni/options.cc

@ -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…
Cancel
Save