Skip to content

ankgup87/rocksdbjni

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

RocksDB JNI gives you a Java interface to the RocksDB C++ library which is an embeddable persistent key-value store for fast storage.

It exposes JNI layer for CRUD operations, merge operators, compaction filters, cache, filter policy, rocksdb specific options etc. Its an ongoing project and some parts of rocksdb like Env, HdfsEnv are yet to be exposed by JNI layer.

For examples, please see DBTest.java class in the repo.

Derived from FuseSource's LevelDB JNI wrapper

Building JNI

The following are instructions to get RocksDB JNI layer running. This has been tested on RHEL 6.1 (2.6.32-131) with GCC 4.7.2.

Installing Custom hawtjni (needed for smart pointer JNI code)

Compile snappy

Compile RocksDB

Set environment variables

  • export ROCKSDB_HOME=/path/to/rocksdb
  • export SNAPPY_HOME=/path/to/snappy

Compile RocksDB JNI

  • git clone https://github.com/ankgup87/rocksdbjni.git
  • cd rocksdbjni
  • mvn install -P download -P linux64
  • Build will break once as Makefile is not setup correctly for c++11 compilation(TODO: fix this.!) In rocksdbjni-linux64/target/native-build/Makefile, (a) append -std=c++11 to CXX=g++ line (b) append -DROCKSDB_PLATFORM_POSIX -I${ROCKSDB_HOME} to CXXFLAGS line. (c) Remove all references to "env."
  • mvn install -P download -P linux64

Output

JAR files will be present at:
rocksdbjni/target/rocksdbjni-0.1.jar
rocksdbjni-linux64/target/rocksdbjni-linux64-0.1.jar

About

JNI for rocksdb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published