rocksdb/hdfs
Dhruba Borthakur ad96563b79 Ability to configure bufferedio-reads, filesystem-readaheads and mmap-read-write per database.
Summary:
This patch allows an application to specify whether to use bufferedio,
reads-via-mmaps and writes-via-mmaps per database. Earlier, there
was a global static variable that was used to configure this functionality.

The default setting remains the same (and is backward compatible):
 1. use bufferedio
 2. do not use mmaps for reads
 3. use mmap for writes
 4. use readaheads for reads needed for compaction

I also added a parameter to db_bench to be able to explicitly specify
whether to do readaheads for compactions or not.

Test Plan: make check

Reviewers: sheki, heyongqiang, MarkCallaghan

Reviewed By: sheki

CC: leveldb

Differential Revision: https://reviews.facebook.net/D9429
2013-03-20 23:14:03 -07:00
..
env_hdfs.h Ability to configure bufferedio-reads, filesystem-readaheads and mmap-read-write per database. 2013-03-20 23:14:03 -07:00
hdfs.h Make Leveldb save data into HDFS files. You have to set USE_HDFS in your environment variable to compile leveldb with HDFS support. 2012-06-14 00:29:01 -07:00
libhdfs.a Add libhdfs.a to the build process. 2012-08-29 15:21:56 -07:00
README Create leveldb server via Thrift. 2012-07-07 09:42:39 -07:00

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

The hdfs.h file is copied from the Apache Hadoop 1.0 source code. 
It defines the libhdfs library
(http://hadoop.apache.org/common/docs/r0.20.2/libhdfs.html) to access 
data in HDFS.  The libhdfs.a is copied from the Apache Hadoop 1.0 build. 
It implements the API defined in hdfs.h. If your hadoop cluster is running
a different hadoop release, then install these two files manually from your
hadoop distribution and then recompile leveldb.

The env_hdfs.h file defines the leveldb objects that are needed to talk to an
underlying filesystem. 

If you want to compile leveldb with hdfs support, please set the following
enviroment variables appropriately:
   USE_HDFS=1
   JAVA_HOME=/usr/local/jdk-6u22-64
   LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/jdk-6u22-64/jre/lib/amd64/server:/usr/local/jdk-6u22-64/jre/lib/amd64/:./snappy/libs
   make clean all db_bench

To run dbbench,
  set CLASSPATH to include your hadoop distribution
  db_bench --hdfs="hdfs://hbaseudbperf001.snc1.facebook.com:9000"