commit | 73b4cd417c0b5e841f5390acbf998ac22361fc84 | [log] [tgz] |
---|---|---|
author | Andrey Yegorov <dlg99@users.noreply.github.com> | Wed Jan 27 23:19:00 2021 -0800 |
committer | GitHub <noreply@github.com> | Thu Jan 28 08:19:00 2021 +0100 |
tree | a004dfa7829da1f90f167b1f0ad9c0cd774aab4d | |
parent | 0a4a5577de00aeaca7cafaf2bd8fee1abe0030d3 [diff] |
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 <eolivelli@gmail.com> This closes #2554 from dlg99/master-streams-tests
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 @@ // rocksdb checkpointer private RocksCheckpointer checkpointer; + static { + RocksDB.loadLibrary(); + } + public RocksdbKVStore() { // initialize the iterators set this.kvIters = Collections.synchronizedSet(Sets.newHashSet());