Commit Graph

2873 Commits

Author SHA1 Message Date
Yueh-Hsuan Chiang
1fd1aecb39 Merge pull request #409 from fyrz/RocksJava-Make-cleanup
[RocksJava] Build improvements
2014-11-20 00:01:48 -08:00
fyrz
91c8dcefc3 [RocksJava] Strip library in publish
Currently maven publishing uses the library with debug symbols. What
leads to unnecessary big library sizes. Included strip to remove
unnecessary stuff. 40M -> 2.7M
2014-11-20 07:28:59 +01:00
fyrz
e7fcaa4d92 [RocksJava] JavaDoc is executed too often
Previous to this commit too much targets got dependencies
on javadocs target.

Introduced one additional target "javalib" which resolves
that situation. JavaDoc will now be generated once while
executing a task with prefix "rocksdbjava".
2014-11-20 07:28:16 +01:00
fyrz
2cd1794e4f [RocksJava] Make cleanup - Clean Target
- Remove JNI includes on clean
- Remove target folder generated by Maven
- Remove shared object
- Remove jar
2014-11-20 07:21:30 +01:00
Lei Jin
be005e17bb fix clang compilation
Summary:
as title
2014-11-18 20:42:32 -08:00
Yueh-Hsuan Chiang
5e69f19c4c Merge pull request #405 from fyrz/RocksJava-Convenient-Options
[RocksJava] Convenience methods for Options
2014-11-18 20:39:51 -08:00
Igor Canadi
55a344872d Merge pull request #408 from fyrz/Missing-include
Missing header in build on CentOS 6.5, GCC4.7
2014-11-18 17:35:34 -08:00
fyrz
9e9a83baf7 Missing header in build on CentOS
While building RocksJava the build fails on
CentOS because of the missing stdexcept header.
2014-11-18 22:21:02 +01:00
fyrz
91ccc8ebef [RocksJava] Integrated changes in D29025
Addressed review comments.
2014-11-18 21:45:12 +01:00
fyrz
5249d0db50 [RocksJava] Convenience methods for Options
RocksDB introduced in 3.7.0 convenience methods
for getting ColumnFamilyOptions and DBOptions
instances from predefined configuration structures.

There is now also a method in RocksJava to load DBOptions
as well as ColumnFamilyOptions from a predefined Properties
based configuration.
2014-11-18 21:43:20 +01:00
Lei Jin
8d3f8f9696 remove all remaining references to cfd->options()
Summary:
The very last reference happens in DBImpl::GetOptions()
I built with both DBImpl::GetOptions() and ColumnFamilyData::options() commented out

Test Plan: make all check

Reviewers: sdong, yhchiang, igor

Reviewed By: igor

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D29073
2014-11-18 10:20:10 -08:00
Lei Jin
1e4a45aac8 remove cfd->options() in DBImpl::NotifyOnFlushCompleted
Summary: We should not reference cfd->options() directly!

Test Plan: make release

Reviewers: sdong, rven, igor, yhchiang

Reviewed By: igor, yhchiang

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D29061
2014-11-18 10:19:48 -08:00
Jonah Cohen
517c28994d Options helper supports k, m, g, and t unit suffixes
Summary:
Add unit support in options helper so we can specify, e.g., 10m for
10 megabytes.

Test Plan: Updated options_test

Reviewers: sdong, igor, ljin

Reviewed By: ljin

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D28977
2014-11-17 13:47:51 -08:00
Yueh-Hsuan Chiang
c46c2be8d6 Merge pull request #397 from fyrz/RocksJava-GetIntProperty
[RocksJava] GetIntProperty in RocksDB
2014-11-17 12:53:44 -08:00
fyrz
8efd4bb424 [RocksJava] Improved comments in RocksDB class
Improved comments in RocksDB getLongProperty methods,
to describe the behavior more detailed.
2014-11-17 21:32:00 +01:00
fyrz
5529c1ad1b [RocksJava] GetIntProperty in RocksDB
Expose GetIntProperty methods to RocksJava. As the integer(64-Bit)
value is no integer in Java the method is aligned with the return
type which is long.
2014-11-17 21:32:00 +01:00
Igor Canadi
db59eeb613 Merge pull request #406 from fyrz/Build-Fix
[RocksJava] JavaDoc corrections - Java8
2014-11-17 10:30:18 -08:00
fyrz
e97f014b91 [RocksJava] JavaDoc corrections - Java8
This commit solves build problems in Java8 due
to wrong JavaDoc.
2014-11-17 19:27:52 +01:00
Yueh-Hsuan Chiang
98e59f9813 Fixed a bug which could hide non-ok status in CompactionJob::Run()
Summary: Fixed a bug which could hide non-ok status in CompactionJob::Run()

Test Plan: make

Reviewers: sdong, igor

Reviewed By: igor

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D28995
2014-11-16 21:52:23 -08:00
Yueh-Hsuan Chiang
ec24bd4e6a Merge pull request #402 from adamretter/bugfix-native-library-loader
Use correct classloader in Java NativeLibraryLoader
2014-11-16 16:42:59 -08:00
Yueh-Hsuan Chiang
d3c4a0f4ae Improve the comment in InfoLogLevelTest.java
Summary:
Improve the comment in InfoLogLevelTest.java

Test Plan:
make rocksdbjava
2014-11-15 17:05:52 -08:00
Yueh-Hsuan Chiang
a77e97c536 Merge pull request #396 from fyrz/RocksJava-LogLevel
[RocksJava] LogLevel support in Options
2014-11-15 17:03:14 -08:00
Adam Retter
585c759cf3 Make sure to use the correct Java classloader for loading the RocksDB
Native Library
2014-11-15 23:42:07 +00:00
Adam Retter
c3915abbae Minor tidyup and use Java 7 for file copying 2014-11-15 23:42:07 +00:00
Igor Canadi
a122a42bbd Merge pull request #399 from fyrz/RocksJava-Version-to-3.8
[RocksJava] Bump version to 3.8.0 in rocksjni.pom
2014-11-15 12:52:51 -08:00
fyrz
b8d5e3f08e [RocksJava] MVN Build reads version from version.h 2014-11-15 20:12:04 +01:00
Igor Canadi
23295b74b6 Clean job_context 2014-11-14 16:57:17 -08:00
Igor Canadi
0ce38fe983 Fix signed/unsigned compile 2014-11-14 16:33:41 -08:00
Igor Canadi
e7960c03ac Don't parallelize the build in travis 2014-11-14 16:23:56 -08:00
Igor Canadi
84af2ff8d3 Clean job context in DeleteFile 2014-11-14 16:20:24 -08:00
fyrz
8a1bcc39c5 [RocksJava] Bump version to 3.8 in rocksjni.pom 2014-11-15 01:09:54 +01:00
Igor Canadi
5c04acda08 Explicitly clean JobContext
Summary: This way we can gurantee that old MemTables get destructed before DBImpl gets destructed, which might be useful if we want to make them depend on state from DBImpl.

Test Plan: make check with asserts in JobContext's destructor

Reviewers: ljin, sdong, yhchiang, rven, jonahcohen

Reviewed By: jonahcohen

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D28959
2014-11-14 15:43:10 -08:00
fyrz
4947a0674f [RocksJava] Incorporated review comments D28947 2014-11-15 00:14:36 +01:00
fyrz
07cd3c42a2 [RocksJava] LogLevel support in Options
It's now possible to set a LogLevel in Options and
DBOptions to control LOG verbosity.
2014-11-14 23:40:20 +01:00
Igor Canadi
26dc5da96c Fix compaction_job_test 2014-11-14 13:42:13 -08:00
Igor Canadi
5f583d2a9c Merge pull request #394 from lalinsky/cuckoo-c
Cuckoo table options missing in the C interface
2014-11-14 13:23:06 -08:00
Yueh-Hsuan Chiang
353303a765 Merge pull request #380 from fyrz/RocksJava-Junit-Framework
[RocksJava] Test framework support
2014-11-14 12:47:07 -08:00
fyrz
3f9c95a519 [RocksJava] Minor lint correction 2014-11-14 21:34:24 +01:00
fyrz
e46450da6d [RocksJava] Rebased + integrated CF tests 2014-11-14 20:59:38 +01:00
fyrz
cd82beb0cb [RocksJava] Merged in latest changes. 2014-11-14 20:59:38 +01:00
fyrz
b6abab8b77 [RocksJava] Merged & rebased to HEAD 2014-11-14 20:59:38 +01:00
fyrz
74057d6d2d [RocksJava] Improved tests within RocksJava 2014-11-14 20:59:36 +01:00
fyrz
628e39e97d [RocksJava] Integrated review comments from D28209 2014-11-14 20:59:36 +01:00
fyrz
a4b28c1ae7 [RocksJava] Extended Testcases 2014-11-14 20:59:36 +01:00
fyrz
36f3a0bb8e [RocksJava] Integrated review comments from adamretter in D28209 2014-11-14 20:59:36 +01:00
fyrz
b092686959 [RocksJava] Extended testcases
+ 7% coverage + 3% branch coverage
2014-11-14 20:59:36 +01:00
fyrz
9bec23c413 [RocksJava] Test-framework integration
Summary:
As we had the discussion some weeks ago. Java needs a test framework and should support code coverage analysis. This pull request includes:

    Move Tests from main method functionality to Junit4
    Move WriteBatchTest to test package
    Adjust the Makefile to run Junit4
    Download dependencies from Make (once if not-present)
    Adjustment of the rocksjni.pom to run coverage analysis using jacoco
    Javadoc excludes now tests
    Two bugfixes regarding GC cleanup which came up within the test runs

Make can be used as beforehand to build and run RocksJava. make test runs tests using the command-line version of Junit4.

Maven can be used to retrieve code coverage reports using mvn -f rocksjni.pom package. Code coverage reports can then be found as usual in the site folder.

Testing libraries available within Java

    Junit4 (incl. hamcrest-core dependency)
    AssertJ (providing fluent syntax for assertions, cglib dependency)
    Mockito to provide mocktests

Libraries as said before are not statically within this commit or filesystem instead they are downloaded using curl. Make checks if files are present, if so it will perform tests without downloading the libraries again.

Note: Libraries are only necessary to compile & run tests.

Next steps after merge:

    Get the maven build into travis-ci and coveralls.io
    Filling up the missing test spots (based on coverage data)

Test Plan:
make rocksdbjava
make jtest

Reviewers: yhchiang, ankgup87, adamretter

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D28209
2014-11-14 20:59:36 +01:00
fyrz
f617135d5f [RocksJava] Testcase improvements 2014-11-14 20:59:36 +01:00
fyrz
1fe7a4c62f [RocksJava] Test-framework integration 2014-11-14 20:59:36 +01:00
Igor Canadi
04ca7481d2 Fix build 2014-11-14 11:52:17 -08:00