This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 73b4cd4 Fixed failing tests for /stream.
73b4cd4 is described below
commit 73b4cd417c0b5e841f5390acbf998ac22361fc84
Author: Andrey Yegorov <[email protected]>
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 <[email protected]>
This closes #2554 from dlg99/master-streams-tests
---
.../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());