From 5abae2c8edb962af994bc49e714ad8c374d75dd7 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Tue, 8 Apr 2014 09:52:26 -0700 Subject: [PATCH] [JNI] Fixed a column family related compile error. Summary: Fixed the following column family related compile error. ./java/rocksjni/write_batch.cc:211:66: error: cannot initialize a parameter of type 'rocksdb::ColumnFamilyMemTables *' with an lvalue of type 'rocksdb::MemTable *' rocksdb::Status s = rocksdb::WriteBatchInternal::InsertInto(b, mem, &options); ^~~ Test Plan: make jni make jtest Reviewers: igor, haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D17577 --- java/rocksjni/write_batch.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/rocksjni/write_batch.cc b/java/rocksjni/write_batch.cc index f72c3ba6de..a3564d536b 100644 --- a/java/rocksjni/write_batch.cc +++ b/java/rocksjni/write_batch.cc @@ -208,7 +208,9 @@ jbyteArray Java_org_rocksdb_WriteBatchTest_getContents( rocksdb::MemTable* mem = new rocksdb::MemTable(cmp, options); mem->Ref(); std::string state; - rocksdb::Status s = rocksdb::WriteBatchInternal::InsertInto(b, mem, &options); + rocksdb::ColumnFamilyMemTablesDefault cf_mems_default(mem, &options); + rocksdb::Status s = + rocksdb::WriteBatchInternal::InsertInto(b, &cf_mems_default); int count = 0; rocksdb::Iterator* iter = mem->NewIterator(); for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {