Commit Graph

372 Commits

Author SHA1 Message Date
fyrz eaf39568e5 [RocksJava] FlushOptions Correction
SetWaitForFlush did not set flush properly.
2015-02-12 17:31:38 +01:00
fyrz 5e8e453d59 [RocksJava] Integrated changes from D33165 2015-02-10 21:12:27 +01:00
fyrz 677d02427f [RocksJava] CF Name shall handle bytes correctly
Summary:
Bytes are currently misinterpreted by the Java if the
byte array contains zero bytes within its content. For Strings
thats usually not useful. As the Java API allows every kind
of byte array values it might be the case that zero padding might
happen.

Test Plan:
make rocksdbjava
make jtest

Reviewers: adamretter, yhchiang, ankgup87

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D33165
2015-02-10 21:00:00 +01:00
Yueh-Hsuan Chiang bbb52b21f3 Merge pull request #483 from adamretter/restructure-java-build
Restructure java build
2015-02-09 14:53:11 +08:00
Adam Retter f33f3955ee Moved Java Samples main classes into samples/src/main/java 2015-02-01 20:05:13 +00:00
Adam Retter ad325517fc Update test lib versions and maven plugin versions 2015-02-01 20:05:10 +00:00
Adam Retter d6187d07bb Maven can now build a standard project layout 2015-02-01 20:05:10 +00:00
Adam Retter 157768890c Moved Java Benchmark main classes into benchmark/src/main/java 2015-02-01 20:05:10 +00:00
Adam Retter dd8d5471ea Adjustment to NativeLibraryLoader to allow native library to be loaded
from either java.library.path or from extracting from the Jar. Means
that the test in the build do not need to rely on the Jar, useful when
creating similar builds (and executing tests) from Maven
2015-02-01 20:05:10 +00:00
Adam Retter 353db6daef Moved Java main classes into src/main/java 2015-02-01 20:04:51 +00:00
Adam Retter 98cb501bc0 Moved Java test classes into src/test/java 2015-02-01 19:30:31 +00:00
fyrz 7479a62a7a Release.md - Remove version change instrcution
The version change instruction is obsolete with the change
that maven pulls versioning information from version.h.
2015-02-01 14:32:51 +01:00
Jörg Maier 4a4e4279f0 Update HISTORY-JAVA.md 2015-01-31 16:13:06 +01:00
fyrz ca52a67cfb [RocksJava] Deprecate setSkipLogErrorOnRecovery
- see: 62ad0a9b19
2015-01-31 15:59:57 +01:00
fyrz cb5c3159f0 [RocksJava] Snapshot - GetSequenceNumber
Summary:
As the C++ part exposes now SequenceNumber retrieval
for Snapshots we want this obviously also in the Java API.

Test Plan:
make rocksdbjava
make jtest
mvn -f rocksjni.pom test

Reviewers: yhchiang, adamretter, ankgup87

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D32571
2015-01-31 15:50:34 +01:00
fyrz 391f85fc82 [RocksJava] Incorporated changes for D32151 2015-01-31 15:15:49 +01:00
fyrz 68cd93b873 [RocksJava] GetUpdatesSince support
Summary:
This differential describes further changes to the Java-API

New methods:

* GetUpdatesSince
* GetLatestSequenceNumber
* EnableFileDeletions
* DisableFileDeletions

This pull requests depends on: https://github.com/facebook/rocksdb/pull/472

Test Plan:
make rocksdbjava
make jtest
mvn -f rocksjni.pom package

Reviewers: yhchiang, adamretter, ankgup87

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D32151
2015-01-31 15:15:48 +01:00
fyrz caedd40ddd [RocksJava] Adjusted auto pointer 2015-01-31 15:15:47 +01:00
fyrz b39006e3db [RocksJava] enable/disable File deletions 2015-01-31 15:15:47 +01:00
fyrz 9a456fba20 [RocksJava] GetUpdatesSince support 2015-01-31 15:15:46 +01:00
fyrz 939bb36597 [RocksJava] Fix ColumnFamily name alloc in TTL DB
While fixing the RocksDB ColumnFamily name the TTL DB
wasn`t touched. This commit resolves this.
2015-01-31 14:43:21 +01:00
fyrz cc0d8be011 [RocksJava] Integrated review comments (D32145) 2015-01-28 21:54:01 +01:00
fyrz ca2b00277e [RocksJava] Cleanup portal.h & tests
Summary:
Simple Java Native Objects usually are represented using
the same functionality but within different classes.

With this commit a template class was introduced to remove
the redundant impelementation to a certain extent.

[RocksJava] Removed todo comment in portal.h

As jclass instances shall not be cached, both
todos are obsolete and can be removed.

[RocksJava] Add missing test to Makefile

[RocksJava] Added tests for uncovered methods

Test Plan:
make rocksdbjava
make jtest
mvn -f rocksjni.pom package

Reviewers: adamretter, yhchiang, ankgup87

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D32145
2015-01-27 21:14:48 +01:00
fyrz f8dc5c459f [RocksJava] Add missing test to Makefile 2015-01-27 21:14:48 +01:00
fyrz b3c1331488 [RocksJava] Removed todo comment in portal.h
As jclass instances shall not be cached, both
todos are obsolete and can be removed.
2015-01-27 21:14:47 +01:00
fyrz 7ffcc457ff [RocksJava] Cleanup portal.h
Simple Java Native Objects usually are represented using
the same functionality but within different classes.

With this commit a template class was introduced to remove
the redundant impelementation to a certain extent.
2015-01-27 21:14:47 +01:00
fyrz e61f38e5a0 [RocksJava] Fix native library loader
Summary:
Prior to this the native library loader instance didn`t
care about a state. So if library loading was called multiple
times, multiple copies of the shared object were put into
the tmp folder and loaded into the JVM.

This changed within this commit to the following behavior:

- library loading is now synchronized
- library is loaded within the first call
- if loading was successful the library loaded sets a flag
- every subsequent call checks for a boolean flag indicating if there was
  already a successful attempt

Test Plan:
- Execute example and watch tmp folder while the example is running

- After this patch only one shared object will be in the tmp folder

Usual tests:
- make rocksdbjava jtest
- mvn -f rocksjni.pom package

Reviewers: adamretter, ankgup87, yhchiang

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D32133
2015-01-24 16:55:28 +01:00
fyrz bef7821f07 [RocksJava] ReadOptions support in Iterators
The methods:

- newIterator
- iterators

support now also ReadOptions. That allows a user of the Java API
to retrieve RocksIterator instances on a snapshot.
2015-01-23 08:02:55 +01:00
Yueh-Hsuan Chiang 912c52e825 Merge pull request #465 from fyrz/RocksJava-BlockBasedTable-FormatVersion
[RocksJava] Format version support in BlockBasedTableConfig
2015-01-22 16:00:42 -08:00
fyrz dd53428f8b Incorporated review comments
- added spaces between operators
- removed obsolete text in JavaDoc
2015-01-22 23:47:31 +01:00
fyrz 908258a4f2 [RocksJava] BlockBasedTableConfig 3.10
- Added support for format version in BlockBasedTableConfig
2015-01-22 23:46:38 +01:00
fyrz 2efe228499 [RocksJava] Incorporated changes for D31809 2015-01-22 23:37:45 +01:00
fyrz e204a5a16c [RocksJava] ColumnFamily name JNI correction
Summary:
Previous to this commit there was a problem with unterminated
String usage as jByteArrays are not zero terminated.

Test Plan:
make rocksdbjava
make jtest
mvn -f rocksjni.pom package

Reviewers: yhchiang, adamretter, ankgup87

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D31809
2015-01-22 23:29:45 +01:00
fyrz 96264784d9 [RocksJava] ColumnFamily name JNI correction
Previous to this commit there was a problem with unterminated
String usage as jByteArrays are not zero terminated.
2015-01-22 23:29:45 +01:00
fyrz 4ffe0be414 [RocksJava] Integrated changes for D31449 2015-01-19 22:19:58 +01:00
fyrz e828567541 [RocksJava] Integrated changes from D31449 2015-01-17 23:52:43 +01:00
fyrz 859c54a03d [RocksJava] TTL-Support
Summary:
TTLDB Support exposed in Java-API. It is now
possible to open a datbase using the RocksDB time
to live feature.

Test Plan:
make rocksdbjava
make test
mvn -f rocksjni.pom package

@Adam please test mac osx compile

Reviewers: yhchiang, adamretter, ankgup87

Subscribers: dhruba, adam

Differential Revision: https://reviews.facebook.net/D31449
2015-01-17 23:28:06 +01:00
fyrz 5ff8aec4db [RocksJava] TTL Support 2015-01-17 23:28:06 +01:00
fyrz ca47da9e63 [RocksJava] TTL-Support 2015-01-17 23:28:05 +01:00
fyrz ea25ff7158 [RocksJava] Integrated proposed simplificiation 2015-01-17 01:22:29 +01:00
fyrz d68e83c356 [RocksJava] DirectSlice String termination fix
DirectSlice fix for non terminated String copy. This lead sometimes
to problems with DirectSliceTest.
2015-01-17 01:15:49 +01:00
fyrz c75c02e7a2 [RocksJava] WriteBatchWithIndexTest fix
Previous to this commit identiy checks were performed. Now tests are
performed using equals - method as intended.
2015-01-15 21:56:46 +01:00
fyrz c787fb50b8 [RocksJava] JavaDoc errors in Java8
Some of the latest commits included illegal JavaDoc formattings.
2015-01-15 21:56:46 +01:00
Adam Retter 3d246c89cc Abstract duplicate code on key and value slice objects into generic methods 2015-01-14 21:16:06 +00:00
Adam Retter 2d0dd8db3b Implement WBWIRocksIterator for WriteBatchWithIndex in the Java API 2015-01-14 21:16:06 +00:00
Adam Retter de678b288e Abstractions for common iterator behaviour 2015-01-14 21:16:06 +00:00
Adam Retter e01acb3a04 Test for WriteBatchWithIndex#newIterator() 2015-01-14 21:16:06 +00:00
Adam Retter 56f24941ab Simplify the Java API by permitting WriteBatchWithIndex to be provided straight to RocksDB#write 2015-01-14 21:16:06 +00:00
Adam Retter 95d5f98487 Test for RocksDB#write(WriteBatchWithIndex) 2015-01-14 21:16:06 +00:00
Adam Retter ef5b34dee0 Implement WriteBatchWithIndex in the Java API 2015-01-14 21:16:05 +00:00