rocksdb/java
Chen Shen 78cb6b6112 Provide byte[] version of SstFileWriter.merge to reduce GC Stall
Summary:
In Java API, `SstFileWriter.put/merge/delete` takes `Slice` type of key and value, which is a Java wrapper object around C++ Slice object.  The Slice object inherited [ `finalize`](3c327ac2d0/java/src/main/java/org/rocksdb/AbstractNativeReference.java (L69)) method, which [added huge overhead](https://softwareengineering.stackexchange.com/questions/288715/is-overriding-object-finalize-really-bad/288753#288753) to JVM while creating new SstFile.

To address this issue, this PR overload the merge method to take Java byte array instead of the Slice object, and added unit test for it.

We also benchmark these two different merge function, where we could see GC Stall reduced from 50%  to 1%, and the throughput increased from 50MB to 200MB.
Closes https://github.com/facebook/rocksdb/pull/2746

Reviewed By: sagar0

Differential Revision: D5653145

Pulled By: scv119

fbshipit-source-id: b55ea58554b573d0b1c6f6170f8d9223811bc4f5
2017-08-22 12:55:24 -07:00
..
benchmark/src/main/java/org/rocksdb/benchmark Change RocksDB License 2017-07-15 16:11:23 -07:00
crossbuild Switch from CentOS 5 to CentOS 6 for crossbuilding RocksJava 2017-06-05 12:27:24 -07:00
rocksjni Provide byte[] version of SstFileWriter.merge to reduce GC Stall 2017-08-22 12:55:24 -07:00
samples/src/main/java Fix statistics in RocksJava sample 2017-08-01 16:58:26 -07:00
src Provide byte[] version of SstFileWriter.merge to reduce GC Stall 2017-08-22 12:55:24 -07:00
CMakeLists.txt Fix for CMakeLists.txt on Windows for RocksJava 2017-08-12 16:44:12 -07:00
HISTORY-JAVA.md Update JAVA-HISTORY.md for v3.13 2015-08-04 18:12:58 -07:00
jdb_bench.sh Moved Java Benchmark main classes into benchmark/src/main/java 2015-02-01 20:05:10 +00:00
Makefile Cassandra compaction filter for purge expired columns and rows 2017-07-21 14:57:44 -07:00
RELEASE.md Fixed packaging of java crossbuild jar by forcing all compiled binaries to be output to the java/target directory. The uber crossbuild jar is then assembled within the java/target directory. 2015-10-12 20:29:58 -04:00
rocksjni.pom Update java/rocksjni.pom 2017-07-18 13:12:23 -07:00