Commit Graph

25 Commits

Author SHA1 Message Date
Ben Clay
c9048021ad RocksJava: memory_util support (#4446)
Summary:
JNI passthrough for utilities/memory/memory_util.cc

sagar0 adamretter
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4446

Differential Revision: D10174578

Pulled By: sagar0

fbshipit-source-id: d1d196d771dff22afb7ef7500f308233675696f8
2018-10-08 11:05:27 -07:00
Christian Esken
c7cf981a85 Add CompactRangeOptions for Java (#4220)
Summary:
Closes https://github.com/facebook/rocksdb/issues/4195

CompactRangeOptions are available the CPP API, but not in the Java API. This PR adds CompactRangeOptions to the Java API and adds an overloaded compactRange() method. See https://github.com/facebook/rocksdb/issues/4195 for the original discussion.

This change supports all fields of CompactRangeOptions, including the required enum converters in the JNI portal.

Significant changes:
- Make CompactRangeOptions available in the compactRange() for Java.
- Deprecate other compactRange() methods that have individual option params, like in the CPP code.
- Migrate rocksdb_compactrange_helper() to  CompactRangeOptions.
- Add Java unit tests for CompactRangeOptions.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4220

Differential Revision: D9380007

Pulled By: sagar0

fbshipit-source-id: 6af6c334f221427f1997b33fb24c3986b092fed6
2018-08-17 10:57:25 -07:00
Tomas Kolda
80afa84903 Windows JNI build fixes (#4015)
Summary:
Fixing compilation, unsatisfied link exceptions (updated list of files that needs to be linked) and warnings for Windows build.
```C++
//MSVC 2015 does not support dynamic arrays like:
  rocksdb::Slice key_parts[jkey_parts_len];
//I have converted to:
  std::vector<rocksdb::Slice> key_parts;
```
Also reusing `free_key_parts` that does the same as `free_key_value_parts` that was removed.

Java elapsedTime unit test increase of sleep to 2 ms. Otherwise it was failing.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4015

Differential Revision: D8558215

Pulled By: sagar0

fbshipit-source-id: d3c34f846343f9218424da2402a2bd367bbd0aa2
2018-07-18 12:31:48 -07:00
Adam Retter
ca87aef82d Added support for SstFileManager to RocksJava
Summary: Closes https://github.com/facebook/rocksdb/pull/3666

Differential Revision: D7457634

Pulled By: sagar0

fbshipit-source-id: 47741e2ee66e9255c580f4e38cfb86b284c27c2f
2018-04-06 21:26:32 -07:00
Adam Retter
c5302a8a58 Java wrapper for Native Comparators
Summary:
This is an abstraction for working with custom Comparators implemented in native C++ code from Java. Native code must directly extend `rocksdb::Comparator`. When the native code comparator is compiled into the RocksDB codebase, you can then create a Java Class, and JNI stub to wrap it.

Useful if the C++/JNI barrier overhead is too much for your applications comparator performance.

An example is provided in `java/rocksjni/native_comparator_wrapper_test.cc` and `java/src/main/java/org/rocksdb/NativeComparatorWrapperTest.java`.
Closes https://github.com/facebook/rocksdb/pull/3334

Differential Revision: D7172605

Pulled By: miasantreble

fbshipit-source-id: e24b7eb267a3bcb6afa214e0379a1d5e8a2ceabe
2018-03-08 11:27:42 -08:00
Adam Retter
db2445ad24 Brings the Java API for WriteBatch inline with the C++ API
Summary:
* Exposes status
* Corrects some method naming
* Adds missing functionality
Closes https://github.com/facebook/rocksdb/pull/3550

Differential Revision: D7140790

Pulled By: sagar0

fbshipit-source-id: cbdab6c5a7ae4f3030fb46739e9060e381b26fa6
2018-03-02 15:44:10 -08:00
Sagar Vemuri
677f249d6d Fix Travis build failures in CMake RocksJava
Summary:
Fixed RocksJava travis build failure due to a missing file in java/CMakeLists.txt. (from #3332).
Closes https://github.com/facebook/rocksdb/pull/3344

Differential Revision: D6686472

Pulled By: sagar0

fbshipit-source-id: dd3281dff1342c3a7235c402890420aa56db0fe3
2018-01-09 16:42:15 -08:00
Adam Retter
00e5e1ef7f Fixes the build on Windows
Summary:
As discovered during v5.9.2 release, and forward-ported.
Closes https://github.com/facebook/rocksdb/pull/3323

Differential Revision: D6657209

Pulled By: siying

fbshipit-source-id: b560d9f8ddb89e0ffaff7c895ec80f68ddf7dab4
2018-01-03 12:27:12 -08:00
Tamir Duberstein
cf0d6aa007 CMake cross platform Java support and add JNI to travis
Summary:
Rewrite `java/CMakeLists.txt` to take advantage of CMake's cross platform
Java support.

adamretter
Closes https://github.com/facebook/rocksdb/pull/2301

Differential Revision: D5070724

Pulled By: sagar0

fbshipit-source-id: 999aee9bd39da2b24a5fe493a2eb0e9af6072dc7
2017-11-28 12:27:53 -08:00
Sagar Vemuri
cc67b22d6e Add OptionsUtil class to java/CMakeLists.txt
Summary:
Adding OptionsUtil java class and options_util.cc to java/CMakeLists.txt, which were missed accidentally when they were introduced in #2898.
Closes https://github.com/facebook/rocksdb/pull/2985

Differential Revision: D6015878

Pulled By: sagar0

fbshipit-source-id: 1abbd46db4aebad1e07ea53523eacbdcb12823e1
2017-10-12 16:57:05 -07:00
Pengchao Wang
825a22c00c garbage collect tombstones in merge operator
Summary:
Remove cassandra tombstone when reaching the max compaction level (full merge). if all columns collected key will be removed in next compaction via compaction filter
Closes https://github.com/facebook/rocksdb/pull/2791

Reviewed By: sagar0

Differential Revision: D5722465

Pulled By: wpc

fbshipit-source-id: 61e9898a5686551653a16383255aeaab3197e65e
2017-08-31 10:11:54 -07:00
Adam Retter
a144a9782d Fix for CMakeLists.txt on Windows for RocksJava
Summary: Closes https://github.com/facebook/rocksdb/pull/2730

Differential Revision: D5619256

Pulled By: ajkr

fbshipit-source-id: c80d697eeceab91964259132e58f5cd2219efb93
2017-08-12 16:44:12 -07:00
Pengchao Wang
534c255c7a Cassandra compaction filter for purge expired columns and rows
Summary:
Major changes in this PR:
* Implement CassandraCompactionFilter to remove expired columns and rows (if all column expired)
* Move cassandra related code from utilities/merge_operators/cassandra to utilities/cassandra/*
* Switch to use shared_ptr<> from uniqu_ptr for Column membership management in RowValue. Since columns do have multiple owners in Merge and GC process, use shared_ptr helps make RowValue immutable.
* Rename cassandra_merge_test to cassandra_functional_test and add two TTL compaction related tests there.
Closes https://github.com/facebook/rocksdb/pull/2588

Differential Revision: D5430010

Pulled By: wpc

fbshipit-source-id: 9566c21e06de17491d486a68c70f52d501f27687
2017-07-21 14:57:44 -07:00
Daniel Black
7550255c54 Add JAVAC_ARGS as Makefile variable
Summary:
Set to "-Xlint:deprecation -Xlint:unchecked" for non-zero
DEBUG_LEVEL

Shows up a few warnings for later perusal however passes ok.
Closes https://github.com/facebook/rocksdb/pull/2557

Differential Revision: D5408104

Pulled By: sagar0

fbshipit-source-id: 02908602e09b46d33b0dfc0ffd4b11954db03c53
2017-07-12 12:12:43 -07:00
Adam Retter
000bf0af38 Improve the design and native object management of Stats in RocksJava
Summary: Closes https://github.com/facebook/rocksdb/pull/2551

Differential Revision: D5399288

Pulled By: sagar0

fbshipit-source-id: dd3df2ed6cc5ae612db0998ea746cc29fccf568e
2017-07-11 23:31:00 -07:00
Adam Retter
5a25304627 Fix the CMakeLists for RocksJava
Summary: Closes https://github.com/facebook/rocksdb/pull/2356

Differential Revision: D5122240

Pulled By: sagar0

fbshipit-source-id: 3764797dd261d5b2a04d58b3967969e66c541bbb
2017-05-24 11:29:08 -07:00
Adam Retter
254c468009 Fix the RocksJava Release on Windows
Summary:
This was previously broken accidentally by https://github.com/facebook/rocksdb/pull/2107

Closes https://github.com/facebook/rocksdb/issues/2293
Closes https://github.com/facebook/rocksdb/pull/2296

Differential Revision: D5061248

Pulled By: sagar0

fbshipit-source-id: 7f58fee754723a7052d2a7f9d3d0369051c3cc5c
2017-05-15 12:37:01 -07:00
Adam Retter
498693cf3e Remove orphaned Java classes
Summary:
Remove orphaned Java classes that were missed from commit 9385fd7
Closes https://github.com/facebook/rocksdb/issues/2210
Closes https://github.com/facebook/rocksdb/pull/2212

Differential Revision: D4986199

Pulled By: maysamyabandeh

fbshipit-source-id: 74e866cd8661c172a4754c2c945e30d650f6fa05
2017-05-02 21:13:49 -07:00
Tomas Kolda
04d58970cb AIX and Solaris Sparc Support
Summary:
Replacement of #2147

The change was squashed due to a lot of conflicts.
Closes https://github.com/facebook/rocksdb/pull/2194

Differential Revision: D4929799

Pulled By: siying

fbshipit-source-id: 5cd49c254737a1d5ac13f3c035f128e86524c581
2017-04-21 20:48:04 -07:00
Adam Retter
2e4b5cab0e Add missing RateLimiter class to the Windows build (#1382) 2016-10-12 15:00:37 -07:00
Injun Song
7260662b39 Add Java API for SstFileWriter
Add Java API for SstFileWriter. Closes https://github.com/facebook/rocksdb/issues/1248
2016-09-29 17:04:41 -04:00
Alexander Jipa
0b63f51fbc fixes 1215: execute_process(COMMAND mkdir ${DIR}) fails to create a directory with cmake on Windows (#1219)
CMake - Use a platform-neutral mkdir function
2016-08-18 00:59:22 +01:00
Alexander Jipa
ac0d93b08f fixes 1217: rocksdbjni javac and javah execute_processes fail on windows (#1218)
picking execute_process command based on OS
2016-07-27 00:18:49 +01:00
Alexander Jipa
515b11ffab fixes #1210: rocksdb/java/CMakeLists.txt lacks cmake_minimum_required (#1214)
specifying minimum cmake version so that no warning has to be suppressed
2016-07-18 16:37:49 +02:00
Tomas Kolda
e2972803a6 Adding support for Windows JNI build 2016-02-02 09:11:37 +01:00