ef8b8a8ef6
Summary: Add Java bindings for memtables and sst format. Specifically, add two abstract Java classses --- MemTableConfig and SstFormatConfig. Each MemTable / SST implementation should has its own config class extends MemTableConfig / SstFormatConfig respectively and pass it to Options via setMemTableConfig / setSstConfig. Test Plan: make rocksdbjava make jdb_test make jdb_bench java/jdb_bench.sh \ --benchmarks=fillseq,readrandom,readwhilewriting \ --memtablerep=hash_skiplist \ --use_plain_table=1 \ --key_size=20 \ --prefix_size=12 \ --value_size=100 \ --cache_size=17179869184 \ --disable_wal=0 \ --sync=0 \ Reviewers: haobo, ankgup87, sdong Reviewed By: haobo CC: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D17997
31 lines
1.4 KiB
Makefile
31 lines
1.4 KiB
Makefile
NATIVE_JAVA_CLASSES = org.rocksdb.RocksDB org.rocksdb.Options org.rocksdb.WriteBatch org.rocksdb.WriteBatchInternal org.rocksdb.WriteBatchTest org.rocksdb.WriteOptions org.rocksdb.BackupableDB org.rocksdb.BackupableDBOptions org.rocksdb.Statistics org.rocksdb.Iterator org.rocksdb.VectorMemTableConfig org.rocksdb.SkipListMemTableConfig org.rocksdb.HashLinkedListMemTableConfig org.rocksdb.HashSkipListMemTableConfig org.rocksdb.PlainTableConfig
|
|
NATIVE_INCLUDE = ./include
|
|
ROCKSDB_JAR = rocksdbjni.jar
|
|
|
|
clean:
|
|
-find . -name "*.class" -exec rm {} \;
|
|
-find . -name "hs*.log" -exec rm {} \;
|
|
rm -f $(ROCKSDB_JAR)
|
|
|
|
java:
|
|
javac org/rocksdb/*.java org/rocksdb/util/*.java
|
|
jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class
|
|
javah -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_CLASSES)
|
|
|
|
sample: java
|
|
javac -cp $(ROCKSDB_JAR) RocksDBSample.java
|
|
@rm -rf /tmp/rocksdbjni
|
|
@rm -rf /tmp/rocksdbjni_not_found
|
|
java -ea -Djava.library.path=.:../ -cp ".:./*" -Xcheck:jni RocksDBSample /tmp/rocksdbjni
|
|
@rm -rf /tmp/rocksdbjni
|
|
@rm -rf /tmp/rocksdbjni_not_found
|
|
|
|
test: java
|
|
javac org/rocksdb/test/*.java
|
|
java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.WriteBatchTest
|
|
java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.BackupableDBTest
|
|
java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.OptionsTest
|
|
|
|
db_bench: java
|
|
javac org/rocksdb/benchmark/*.java
|