Coder Social home page Coder Social logo

rocksdb-hdfs-plugin's Introduction

This directory contains the hdfs extensions needed to make rocksdb store files in HDFS.

The configuration assumes that packages libhdfs0, libhdfs0-dev are installed which basically means that hdfs.h is $HADOOP_HOME/include.

The env_hdfs.[cc,h] define a factory function NewHdfsEnv(...) that creates a HdfsEnv object given a string-baed uri representing the uri of the HDFS.

The env_hdfs_impl.[cc,h] files define the HdfsEnv needed to talk to an underlying HDFS.

Build

If you want to compile rocksdb with hdfs support, please set $JAVA_HOME and $HADOOP_HOME accordingly. On my devserver, I have

$ echo $JAVA_HOME
/usr/local/fb-jdk-8/
$ echo $HADOOP_HOME
/home/<username>/hadoop-3.3.1/

The hadoop-3.3.1 is the directory resulting from untaring a standard hadoop-3.3.1.tar.gz downloaded from https://hadoop.apache.org/releases.html.

Next, run the commands listed in setup.sh:

export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:$JAVA_HOME/jre/lib/amd64:$HADOOP_HOME/lib/native

export CLASSPATH=`$HADOOP_HOME/bin/hadoop classpath --glob`
for f in `find $HADOOP_HOME/share/hadoop/hdfs | grep jar`; do export CLASSPATH=$CLASSPATH:$f; done
for f in `find $HADOOP_HOME/share/hadoop | grep jar`; do export CLASSPATH=$CLASSPATH:$f; done
for f in `find $HADOOP_HOME/share/hadoop/client | grep jar`; do export CLASSPATH=$CLASSPATH:$f; done

The code first needs to be linked under RocksDB's "plugin/" directory. In your RocksDB directory, run:

$ pushd ./plugin/
$ git clone https://github.com/riversand963/rocksdb-hdfs-env.git hdfs

Note that please do not clone it into a directory whose name contains -, otherwise the Makefile won't pick it up. In this example, we clone it into a directory called 'hdfs'.

Next, we can build and install RocksDB with this plugin as follows:

$ popd
$ make clean && DEBUG_LEVEL=0 ROCKSDB_PLUGINS="hdfs" make -j48 db_bench db_stress install

Tool usage

For RocksDB binaries, e.g. db_bench and db_stress we built earlier, the plugin can be enabled through configuration. Db_bench and db_stress in particular takes a -env_uri where we can specify a HDFS. For example

$ ./db_stress -env_uri=hdfs://localhost:9000/ -compression_type=none
$ ./db_bench -benchmarks=fillrandom -env_uri=hdfs://localhost:9000/ --compression_type=none

rocksdb-hdfs-plugin's People

Contributors

alanpaxton avatar riversand963 avatar veedata avatar mrambacher avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.