rocksdb/java
fyrz 4f5a687254 32-Bit RocksJava resolution for jlong overflows
Summary:
This pull request solves the jlong overflow problem on 32-Bit machines as described in https://github.com/facebook/rocksdb/issues/278:

1. There is a new org.rocksdb.test.PlatformRandomHelper to assist in getting random values. For 32 Bit the getLong method is overriden by xpromaches code above. For 64 Bit it behaves as is.
2. The detection should be cross-platform (Windows is supported though it is not ported completely yet).
3. Every JNI method which sets jlong values must check if the value fits into size_t. If it overflows size_t a InvalidArgument Status object will be returned. If its ok a OK Status will be returned.
4. Setters which have this check will throw a RocksDBException if its no OK Status.

Additionally some other parts of code were corrected using the wrong type casts.

Test Plan:
make rocksdbjava
make jtest

Differential Revision: https://reviews.facebook.net/D24531
2014-10-12 22:42:18 +02:00
..
crossbuild add centos 5.6 build instead of ubuntu. 2014-09-29 16:58:16 -07:00
org/rocksdb 32-Bit RocksJava resolution for jlong overflows 2014-10-12 22:42:18 +02:00
rocksjni 32-Bit RocksJava resolution for jlong overflows 2014-10-12 22:42:18 +02:00
HISTORY-JAVA.md [Java] Add HISTORY-JAVA.md and include both C++ and Java history files in .jar. 2014-06-20 23:18:25 -07:00
jdb_bench.sh Cross platform fix for Java benchmark shell script. 2014-10-05 10:46:55 +02:00
Makefile RocksJava Makefile includes incorrect paths to version.h 2014-10-07 20:43:04 +02:00
RELEASE.md update release readme 2014-10-06 08:24:51 -07:00
RocksDBSample.java 32-Bit RocksJava resolution for jlong overflows 2014-10-12 22:42:18 +02:00
rocksjni.pom bump version to 3.6 2014-10-02 14:59:20 -07:00