You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by eo...@apache.org on 2021/01/28 07:19:45 UTC
[bookkeeper] branch branch-4.11 updated: Fixed failing tests for
/stream.
This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch branch-4.11
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.11 by this push:
new 696c057 Fixed failing tests for /stream.
696c057 is described below
commit 696c057a0bf9c1b6db63098d7e3f84f5429aa3c5
Author: Andrey Yegorov <dl...@users.noreply.github.com>
AuthorDate: Wed Jan 27 23:19:00 2021 -0800
Fixed failing tests for /stream.
Descriptions of the changes in this PR:
Fixed tests for /stream, RocksDB initialization.
Same as https://github.com/apache/bookkeeper/pull/2551 but for master branch
### Motivation
Tests were failing with " “java.lang.UnsatisfiedLinkError: 'long org.rocksdb.LRUCache.newLRUCache(long, int, boolean, double)'”".
### Changes
Fixed following suggestion form https://github.com/facebook/rocksdb/issues/6789
Added
` static {
RocksDB.loadLibrary();
}`
to extract the native library from the jar file etc.
Master Issue: #2550
Reviewers: Enrico Olivelli <eo...@gmail.com>
This closes #2554 from dlg99/master-streams-tests
(cherry picked from commit 73b4cd417c0b5e841f5390acbf998ac22361fc84)
Signed-off-by: Enrico Olivelli <eo...@apache.org>
---
.../java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java b/stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java
index 0c4b95f..fabf1e4 100644
--- a/stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java
+++ b/stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java
@@ -127,6 +127,10 @@ public class RocksdbKVStore<K, V> implements KVStore<K, V> {
// rocksdb checkpointer
private RocksCheckpointer checkpointer;
+ static {
+ RocksDB.loadLibrary();
+ }
+
public RocksdbKVStore() {
// initialize the iterators set
this.kvIters = Collections.synchronizedSet(Sets.newHashSet());