Expose JNI layer for these options: block_size, max_write_buffer_number, write_buffer_size, disable_seek_compaction, max_background_compactions.

This commit is contained in:
Ankit Gupta
2014-04-06 09:33:31 -07:00
parent 3699fda6c7
commit 63d74d2bfa
3 changed files with 222 additions and 3 deletions

View File

@@ -33,6 +33,19 @@ public class RocksDBSample {
}
options.setCreateIfMissing(true);
options.setWriteBufferSize(8*1024);
options.setMaxWriteBufferNumber(3);
options.setDisableSeekCompaction(true);
options.setBlockSize(64*1024);
options.setMaxBackgroundCompactions(10);
assert(options.createIfMissing() == true);
assert(options.writeBufferSize() == 8192);
assert(options.maxWriteBufferNumber() == 3);
assert(options.disableSeekCompaction() == true);
assert(options.blockSize() == 65536);
assert(options.maxBackgroundCompactions() == 10);
try {
db = RocksDB.open(options, db_path_not_found);
db.put("hello".getBytes(), "world".getBytes());