rocksdb 5.18.3 jar not available in maven

Created on 11 Apr 2019  路  5Comments  路  Source: facebook/rocksdb

RocksDB v 5.18.3 is released, but jars are not available in maven repo.

Could not find org.rocksdb:rocksdbjni:5.18.3.
Searched in the following locations:
https://repo1.maven.org/maven2/org/rocksdb/rocksdbjni/5.18.3/rocksdbjni-5.18.3.pom
https://repo1.maven.org/maven2/org/rocksdb/rocksdbjni/5.18.3/rocksdbjni-5.18.3.jar
java-api

Most helpful comment

I have just release 6.0.1 to Maven Central, although again I had to make some small patches to fix the build on all platforms:

diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc
index ec9cdcab4..a4d14e50b 100644
--- a/tools/db_bench_tool.cc
+++ b/tools/db_bench_tool.cc
@@ -4701,10 +4701,10 @@ void VerifyDBFromDB(std::string& truth_db_name) {
     // the limit of qps initiation
     if (FLAGS_sine_a != 0 || FLAGS_sine_d != 0) {
       thread->shared->read_rate_limiter.reset(NewGenericRateLimiter(
-          read_rate, 100000 /* refill_period_us */, 10 /* fairness */,
+          static_cast<int64_t>(read_rate), 100000 /* refill_period_us */, 10 /* fairness */,
           RateLimiter::Mode::kReadsOnly));
       thread->shared->write_rate_limiter.reset(
-          NewGenericRateLimiter(write_rate));
+          NewGenericRateLimiter(static_cast<int64_t>(write_rate)));
     }

     Duration duration(FLAGS_duration, reads_);
@@ -4740,9 +4740,9 @@ void VerifyDBFromDB(std::string& truth_db_name) {
             mix_rate_with_noise * query.ratio_[1] * FLAGS_mix_ave_kv_size;

         thread->shared->write_rate_limiter.reset(
-            NewGenericRateLimiter(write_rate));
+            NewGenericRateLimiter(static_cast<int64_t>(write_rate)));
         thread->shared->read_rate_limiter.reset(NewGenericRateLimiter(
-            read_rate,
+            static_cast<int64_t>(read_rate),
             FLAGS_sine_mix_rate_interval_milliseconds * uint64_t{1000}, 10,
             RateLimiter::Mode::kReadsOnly));
       }
diff --git a/port/jemalloc_helper.h b/port/jemalloc_helper.h
index 412a80d26..0c216face 100644
--- a/port/jemalloc_helper.h
+++ b/port/jemalloc_helper.h
@@ -12,6 +12,10 @@
 #include <jemalloc/jemalloc.h>
 #endif

+#ifndef JEMALLOC_CXX_THROW
+#define JEMALLOC_CXX_THROW
+#endif
+
 // Declare non-standard jemalloc APIs as weak symbols. We can null-check these
 // symbols to detect whether jemalloc is linked with the binary.
 extern "C" void* mallocx(size_t, int) __attribute__((__weak__));

All 5 comments

Yes, I too would like this on Maven, since it has some much needed performance improving APIs.

@siying 5.18.x and 6.x versions of the Java API have not been released. Do you know if something blocking their release? What can be done (contributed) to ensure more regular/timely releases of the Java API?

I have just released 5.18.3 to Maven Central, although I had to make some small patches to fix the build on all platforms:

diff --git a/java/src/main/java/org/rocksdb/MemoryUsageType.java b/java/src/main/java/org/rocksdb/MemoryUsageType.java
index 3523cd0ee..a465f45a0 100644
--- a/java/src/main/java/org/rocksdb/MemoryUsageType.java
+++ b/java/src/main/java/org/rocksdb/MemoryUsageType.java
@@ -54,9 +54,9 @@ public enum MemoryUsageType {
    *     cannot be found
    */
   public static MemoryUsageType getMemoryUsageType(final byte byteIdentifier) {
-    for (final MemoryUsageType MemoryUsageType : MemoryUsageType.values()) {
-      if (MemoryUsageType.getValue() == byteIdentifier) {
-        return MemoryUsageType;
+    for (final MemoryUsageType memoryUsageType : MemoryUsageType.values()) {
+      if (memoryUsageType.getValue() == byteIdentifier) {
+        return memoryUsageType;
       }
     }

diff --git a/java/src/test/java/org/rocksdb/MergeTest.java b/java/src/test/java/org/rocksdb/MergeTest.java
index b2ec62635..2d4bec13b 100644
--- a/java/src/test/java/org/rocksdb/MergeTest.java
+++ b/java/src/test/java/org/rocksdb/MergeTest.java
@@ -46,13 +46,13 @@ public class MergeTest {
   }

   private byte[] longToByteArray(long l) {
-    ByteBuffer buf = ByteBuffer.allocate(Long.BYTES);
+    ByteBuffer buf = ByteBuffer.allocate(8);
     buf.putLong(l);
     return buf.array();
   }

   private long longFromByteArray(byte[] a) {
-    ByteBuffer buf = ByteBuffer.allocate(Long.BYTES);
+    ByteBuffer buf = ByteBuffer.allocate(8);
     buf.put(a);
     buf.flip();
     return buf.getLong();
diff --git a/port/jemalloc_helper.h b/port/jemalloc_helper.h
index 412a80d26..0c216face 100644
--- a/port/jemalloc_helper.h
+++ b/port/jemalloc_helper.h
@@ -12,6 +12,10 @@
 #include <jemalloc/jemalloc.h>
 #endif

+#ifndef JEMALLOC_CXX_THROW
+#define JEMALLOC_CXX_THROW
+#endif
+
 // Declare non-standard jemalloc APIs as weak symbols. We can null-check these
 // symbols to detect whether jemalloc is linked with the binary.
 extern "C" void* mallocx(size_t, int) __attribute__((__weak__));

I will also release the 6.0.1 shortly...

I have just release 6.0.1 to Maven Central, although again I had to make some small patches to fix the build on all platforms:

diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc
index ec9cdcab4..a4d14e50b 100644
--- a/tools/db_bench_tool.cc
+++ b/tools/db_bench_tool.cc
@@ -4701,10 +4701,10 @@ void VerifyDBFromDB(std::string& truth_db_name) {
     // the limit of qps initiation
     if (FLAGS_sine_a != 0 || FLAGS_sine_d != 0) {
       thread->shared->read_rate_limiter.reset(NewGenericRateLimiter(
-          read_rate, 100000 /* refill_period_us */, 10 /* fairness */,
+          static_cast<int64_t>(read_rate), 100000 /* refill_period_us */, 10 /* fairness */,
           RateLimiter::Mode::kReadsOnly));
       thread->shared->write_rate_limiter.reset(
-          NewGenericRateLimiter(write_rate));
+          NewGenericRateLimiter(static_cast<int64_t>(write_rate)));
     }

     Duration duration(FLAGS_duration, reads_);
@@ -4740,9 +4740,9 @@ void VerifyDBFromDB(std::string& truth_db_name) {
             mix_rate_with_noise * query.ratio_[1] * FLAGS_mix_ave_kv_size;

         thread->shared->write_rate_limiter.reset(
-            NewGenericRateLimiter(write_rate));
+            NewGenericRateLimiter(static_cast<int64_t>(write_rate)));
         thread->shared->read_rate_limiter.reset(NewGenericRateLimiter(
-            read_rate,
+            static_cast<int64_t>(read_rate),
             FLAGS_sine_mix_rate_interval_milliseconds * uint64_t{1000}, 10,
             RateLimiter::Mode::kReadsOnly));
       }
diff --git a/port/jemalloc_helper.h b/port/jemalloc_helper.h
index 412a80d26..0c216face 100644
--- a/port/jemalloc_helper.h
+++ b/port/jemalloc_helper.h
@@ -12,6 +12,10 @@
 #include <jemalloc/jemalloc.h>
 #endif

+#ifndef JEMALLOC_CXX_THROW
+#define JEMALLOC_CXX_THROW
+#endif
+
 // Declare non-standard jemalloc APIs as weak symbols. We can null-check these
 // symbols to detect whether jemalloc is linked with the binary.
 extern "C" void* mallocx(size_t, int) __attribute__((__weak__));

@adamretter Thank you very much!!!

Was this page helpful?
0 / 5 - 0 ratings