Skip to content

Commit dd641b2

Browse files
author
Lei Jin
committed
fix RocksDB java build
Summary: as title Test Plan: make rocksdbjava Reviewers: sdong, yhchiang, igor Reviewed By: igor Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D23193
1 parent 53404d9 commit dd641b2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

java/rocksjni/write_batch.cc

+7-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "include/org_rocksdb_WriteBatchTest.h"
1313
#include "rocksjni/portal.h"
1414
#include "rocksdb/db.h"
15+
#include "rocksdb/immutable_options.h"
1516
#include "db/memtable.h"
1617
#include "rocksdb/write_batch.h"
1718
#include "db/write_batch_internal.h"
@@ -203,16 +204,18 @@ jbyteArray Java_org_rocksdb_WriteBatchTest_getContents(
203204
auto factory = std::make_shared<rocksdb::SkipListFactory>();
204205
rocksdb::Options options;
205206
options.memtable_factory = factory;
206-
rocksdb::MemTable* mem = new rocksdb::MemTable(cmp, options);
207+
rocksdb::MemTable* mem = new rocksdb::MemTable(
208+
cmp, rocksdb::ImmutableCFOptions(options),
209+
rocksdb::MemTableOptions(options));
207210
mem->Ref();
208211
std::string state;
209212
rocksdb::ColumnFamilyMemTablesDefault cf_mems_default(mem, &options);
210213
rocksdb::Status s =
211214
rocksdb::WriteBatchInternal::InsertInto(b, &cf_mems_default);
212215
int count = 0;
213-
Arena arena;
214-
ScopedArenaIterator iter(mem->NewIterator(
215-
rocksdb::ReadOptions(), false /*don't enforce total order*/, &arena));
216+
rocksdb::Arena arena;
217+
rocksdb::ScopedArenaIterator iter(mem->NewIterator(
218+
rocksdb::ReadOptions(), &arena));
216219
for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
217220
rocksdb::ParsedInternalKey ikey;
218221
memset(reinterpret_cast<void*>(&ikey), 0, sizeof(ikey));

0 commit comments

Comments
 (0)