79 Commits

Author SHA1 Message Date
Tom Parker-Shemilt
2f623f985d Add javadoc build 2024-02-19 19:10:00 -06:00
Dimitris Apostolou
a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Vaidas Gasiunas
607a1040ed Testing future cancelation in Java bindings with an external client 2023-05-12 15:57:45 +02:00
Markus Pilman
5bebb5b4aa
Merge pull request #9492 from sfc-gh-vgasiunas/vgasiunas-api-version-defs
Centralize definition of API Version for Java, Python and C API
2023-02-28 12:04:02 -07:00
Russell Sears
d02118db67 Add support for using pre-downloaded junit dependencies 2023-02-27 15:38:58 -06:00
Vaidas Gasiunas
83f76b60b9 Define the API version separately for the Java tests that are not executed as a part of the CI 2023-02-27 18:20:11 +01:00
Vaidas Gasiunas
7f35b395d3 Define the latest Java bindings API version in one place 2023-02-27 11:53:01 +01:00
Josh Slocum
2f8f7515e8
adding java blob granules unit test (#9317)
* adding java blob granules unit test

* reduce sleep and organize imports
2023-02-08 12:02:14 -06:00
Markus Pilman
4d9465a30b Disable java-workload in IDE-mode 2022-10-10 10:29:23 -06:00
Dennis Zhou
e4f433a480 bindings/java: add KeyRange bindings 2022-08-16 13:29:23 -07:00
Dennis Zhou
de732c2603 bindings: add FutureBool future type 2022-08-15 16:25:36 -07:00
A.J. Beamon
be7315473a Move tenant creation/deletion into a TenantManagement class 2022-03-30 16:31:28 -07:00
A.J. Beamon
a2a97e7176 Add tenant support to the Java bindings 2022-03-30 16:31:28 -07:00
Tao Lin
e2c7c30faf
GetMappedRange support serializable & check RYW & continuation (#6181) 2022-03-10 10:05:44 -08:00
Andrew Noyes
9a45df8e6c
Change fdb_c's dep on fdbclient to be private (#6466)
That way transitive dependencies (e.g. libfdb_java.so) don't include
unnecessary fdbclient code. Related: #6455
2022-03-01 18:08:50 -08:00
vikasgupta8
edfff755bf added support for ppc64le 2022-02-11 06:17:15 +00:00
Andrew Noyes
21a5aebc7c Rebuild fat jar if fdbJNI.cpp changes
At least now if you change fdbJNI.cpp it rebuilds the fat jar. I'm
pretty sure there are other problems with incremental recompilation here
but at least this is an improvement.
2022-01-06 15:45:23 -08:00
Andrew Noyes
5e140bc233 Build native headers for jni
This will help ensure that native java functions are implemented with
the right type.
2022-01-06 15:45:23 -08:00
Andrew Noyes
5d88fdf16c Use the correct directory for m1 for embedding libfdb_java 2021-12-03 16:31:50 -08:00
Aaron Molitor
77db63274b use FDB_VERSION in lieu of PROJECT_VERSION or CMAKE_PROJECT_VERSION
write FDB_VERSION to a file to avoid regex golf in other build scripts
2021-11-29 15:11:20 -08:00
Aaron Molitor
08b635d405 rename prerelease_string, replace PRERELEASE with SNAPSHOT 2021-11-29 15:11:20 -08:00
Russell Sears
c42815f15f
Merge pull request #5127 from vishesh/cherrypick
Making it possible to run a multiple-cluster Java integration test (cherry-pick of #4456 from 6.3)
2021-07-13 09:14:20 -07:00
Scott Fines
d1db0d4013 Making it possible to run a multiple-cluster Java integration test 2021-07-07 10:15:18 -07:00
Andrew Noyes
cd5c0481cc Use linker script for external workloads
This fixes an issue on Arm with lld:

ld.lld: error: relocation R_AARCH64_PREL64 cannot be used against symbol OPENSSL_armcap_P; recompile with -fPIC

I think the problem was that lld thought that the shared object might
need to interpose OPENSSL_armcap_P at runtime, although honestly I'm not
too sure about all this linker stuff.
2021-06-05 14:43:50 -07:00
Andrew Noyes
4163270c02 Put aarch64 libfdb_java in the right place for fat jar 2021-05-13 23:13:14 +00:00
Andrew Noyes
a76c7b9754 Fix several memory leaks and a thread leak 2021-03-11 23:58:32 +00:00
Vishesh Yadav
2cd3f45fd6 Merge remote-tracking branch 'apple/release-6.3' into master-format-final
release-6.3 was recently merged, and there were two PRs which were
merged in between and got those changes in here. Hence, since all the
changes were in, discarded the incoming changes and accepted all
current.
2021-03-10 16:50:44 -08:00
Scott Fines
df6faa089a Addressing PR comments 2021-03-08 14:10:20 -06:00
Scott Fines
c6731cc053 Basic instrumentation of Java Bindings 2021-03-05 14:26:46 -06:00
Andrew Noyes
e62cdbad3b Mention that tests share an fdb cluster 2021-03-02 16:31:58 +00:00
Andrew Noyes
18ee11e69a Use add_fdbclient_test for java integration tests
Also change add_fdbclient_test to run its subcommand with FDB_CLUSTER_FILE set
2021-03-02 01:54:17 +00:00
Scott Fines
7054328d8a New Unit and Integration Tests, and associated infrastructure.
First, this converts the java unit testing framework to junit 5.

Then we create some easy unit tests, move TupleTest logic into unit
tests, and move some other tests into ArrayUtilTests.

This also adds new cmake configuration to run junit and integration tests
through ctest.

There is a mechanism to write integration tests that depend on a running
fdb cluster by having those tests be skipped if they can't connect to a
database quickly. This should help to add those tests in CI, although
eventually we'll probably want to move this to throw an error instead
(once the CI build process clears out and we can guarantee a running
server during CI testing).

Converting to junit 5
2021-03-01 09:11:45 -06:00
Scott Fines
236510652d Resolves 4323: make Junit tests run as separate ctest tests.
This adds the ability to run junit tests through ctest a little more
easily (no Suites required). It also adds a small amount of
documentation to explain to the average developer how to go about using
Junit effectively.
2021-02-24 14:24:23 -06:00
Scott Fines
0bf7f9cf63 New Unit and Integration Tests, and associated infrastructure.
First, this converts the java unit testing framework to junit 5.

Then we create some easy unit tests, move TupleTest logic into unit
tests, and move some other tests into ArrayUtilTests.

This also adds new cmake configuration to run junit and integration tests
through ctest.

There is a mechanism to write integration tests that depend on a running
fdb cluster by having those tests be skipped if they can't connect to a
database quickly. This should help to add those tests in CI, although
eventually we'll probably want to move this to throw an error instead
(once the CI build process clears out and we can guarantee a running
server during CI testing).

Converting to junit 5
2021-02-24 09:35:35 -06:00
Scott Fines
2589c26907 Resolves 4323: make Junit tests run as separate ctest tests.
This adds the ability to run junit tests through ctest a little more
easily (no Suites required). It also adds a small amount of
documentation to explain to the average developer how to go about using
Junit effectively.
2021-02-12 15:34:04 -06:00
Xin Dong
5d902f9177
Merge pull request #3394 from dongxinEric/feature/range-split-points-based-on-size
Feature/range split points based on size
2020-10-08 14:25:11 -07:00
Markus Pilman
3395e2b1a2 fix junit tests 2020-09-28 14:00:48 -06:00
Markus Pilman
38857b9773 remove pom reference 2020-09-28 12:49:12 -06:00
Markus Pilman
a5439f39a2 Run junit tests with ctest 2020-09-25 16:28:07 -06:00
Markus Pilman
a3c65f81d2 Build with maven (doesn't work yet) 2020-09-25 14:59:25 -06:00
Markus Pilman
33d6c412c1 return error code correctly and cmake fixes 2020-09-24 15:58:41 -06:00
Markus Pilman
4c25214085 Add ability to run tests on fdb in ctest 2020-09-24 15:43:05 -06:00
Xin Dong
c6477bbc61
Merge branch 'master' into feature/range-split-points-based-on-size 2020-09-02 09:41:17 -07:00
Vishesh Yadav
5d5dab1040 java-bindings: Minors fixes and refactor 2020-08-25 17:01:37 -07:00
Vishesh Yadav
5cefb27fe2 java-bindings: Addressed review comments 2020-08-25 16:03:27 -07:00
Vishesh Yadav
9123ffb1bf java-bindings: Use DirectBuffer with standard Async call 2020-08-25 14:29:50 -07:00
Vishesh Yadav
be184a9dc2 java-bindings: Use DirectBuffer for getRange requests #3682
This patch keeps a batch of Java's DirectBuffers, which can be shared with JNI C
world. This means:

1. No need for JNI wrapper to make several JNI calls, to allocate and convert
   Java objectd to bytes.
2. We already made a PR #3582 to reduce 3 JNI calls for each getRange() i.e. to
   fetch summary and then results. As mentioned in that PR, this patch also
   makes similar decision to make `getDirectRange()` call synchronous and
   instead schedule it asynchronously in Java executor.
3. No need for JNI to dynamically allocate buffers to store KVs.
4. Use one big DirectBuffer to make request and get reponse. `DirectBuffers` give
   direct access to the memory, and are much fast than the regular non-direct
   buffers we use.
5. We keep a pool of reasonably big DirectBuffers, which are borrowed and
   returned by `getRange()` requests.

The downside to this are:

1. We have to manually and "carefully" serialize and deserialize the
   request/response both in C and Java world. It is no longer high-level Java
   objects.
2. Because `DirectBuffers` are expensive, we can only keep a few of them, which
   number of outstanding `getRange()` requests are limited by that.
3. Each request, currently uses 2 buffers, one for current chunk and one for
   outstanding request.
4. The performance bump seems to be excellent for bigger key-values. We didn't
   observe significant difference for smaller KV sizes (I can't say its better
   or worse, as from quick glance it didn't look statistically significant to me).

Performance is currently measured using `PerformanceTester.java`, which measures
throughput for several operations. The results are:

```
 1. Using Key = 16bytes, Value = 100bytes
=========================================

Without this PR=>
                                                           Count     Avg    Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  -----  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  30  349363  73590  316218    342523  406445  540731
get_single_key_range throughput (local client) [keys/s]       30    7685   6455    6981      7744    8129    9773

** With this PR ==>
                                                           Count     Avg    Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  -----  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  30  383404  70181  338810    396950  437335  502886
get_single_key_range throughput (local client) [keys/s]       30    7029   5515    6635      7090    7353    8219

=======================================
2. Using Key = 256bytes, Value = 512bytes
========================================

** Without this PR ==>
                                                           Count     Avg     Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  ------  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  90  132787  102036  122650    130204  138269  202790
get_single_key_range throughput (local client) [keys/s]       90    5833    4894    5396      5690    6061    8986

** With this PR ==>
                                                           Count     Avg     Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  ------  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  90  359302  196676  310931    344029  407232  494259
get_single_key_range throughput (local client) [keys/s]       90    7227    5573    6771      7177    7477   10108
====================================================================================================================

=======================================
3. Using Key = 128bytes, Value = 512bytes
========================================

** Without this PR ==>
                                                           Count     Avg     Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  ------  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  30  235661  148963  213670    229090  256825  317050
get_single_key_range throughput (local client) [keys/s]       30   10441    6302   10586     10873   10960   11065
====================================================================================================================

** With this PR ==>
                                                           Count     Avg     Min      Q1    Median      Q3     Max
-------------------------------------------------------  -------  ------  ------  ------  --------  ------  ------
get_range throughput (local client) [keys/s]                  30  350612  185698  320868    348998  406750  459101
get_single_key_range throughput (local client) [keys/s]       30   10338    6570   10664     10847   10901   11040
====================================================================================================================
```

NOTE: These tests were run on a shared VM. Benchmark in each group was run
serially, and the groups themselves run at different times. Therefore there
might be some skew based on load, but the difference is compelling enough to
show that there is performance benefit for larger KV.
2020-08-24 23:34:54 -07:00
Xin Dong
440630a0cb Added bindings supports 2020-07-02 14:05:11 -07:00
Markus Pilman
2f55ee12ef suppress Unsafe warning in java bindings
Fixes #3002
2020-04-22 14:14:24 -07:00
John Leach
7f75eab32b Fix #2822: ByteArrayUtil does not use the now standard Unsafe Approach for byte[] comparisons. 2020-04-21 12:20:12 -07:00