From f799c8be5fee3bf98b4558cc588ae1072d41bc34 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Sun, 29 Jun 2014 12:35:47 -0700 Subject: [PATCH] [Java] Correct the library loading for zlib in RocksJava. Summary: Correct the library loading for zlib in RocksJava: zlib should be loaded by loadLibrary("z") instead of loadLibrary("zlib"). Test Plan: make rocksdbjava cd java make db_bench ./jdb_bench.sh --compression_type=zlib Reviewers: sdong, ljin, ankgup87 Reviewed By: ankgup87 Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D19341 --- java/org/rocksdb/RocksDB.java | 2 +- java/org/rocksdb/benchmark/DbBenchmark.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/rocksdb/RocksDB.java b/java/org/rocksdb/RocksDB.java index cec73ed49..a55266e25 100644 --- a/java/org/rocksdb/RocksDB.java +++ b/java/org/rocksdb/RocksDB.java @@ -21,7 +21,7 @@ import org.rocksdb.util.Environment; public class RocksDB extends RocksObject { public static final int NOT_FOUND = -1; private static final String[] compressionLibs_ = { - "snappy", "zlib", "bzip2", "lz4", "lz4hc"}; + "snappy", "z", "bzip2", "lz4", "lz4hc"}; /** * Loads the necessary library files. diff --git a/java/org/rocksdb/benchmark/DbBenchmark.java b/java/org/rocksdb/benchmark/DbBenchmark.java index 5fcbed7e2..d0b2eab21 100644 --- a/java/org/rocksdb/benchmark/DbBenchmark.java +++ b/java/org/rocksdb/benchmark/DbBenchmark.java @@ -463,7 +463,7 @@ public class DbBenchmark { if (compressionType_.equals("snappy")) { System.loadLibrary("snappy"); } else if (compressionType_.equals("zlib")) { - System.loadLibrary("zlib"); + System.loadLibrary("z"); } else if (compressionType_.equals("bzip2")) { System.loadLibrary("bzip2"); } else if (compressionType_.equals("lz4")) {