Skip to content

Commit

Permalink
Merge pull request #154 from mrsqueeze/master
Browse files Browse the repository at this point in the history
hdfs cleanup and compile test against CDH 4.4.
  • Loading branch information
igorcanadi committed May 21, 2014
2 parents f725e4f + 591f712 commit 62d2b92
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 498 deletions.
2 changes: 1 addition & 1 deletion build_tools/build_detect_platform
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ if test "$USE_HDFS"; then
exit 1
fi
HDFS_CCFLAGS="$HDFS_CCFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -DUSE_HDFS"
HDFS_LDFLAGS="$HDFS_LDFLAGS -Wl,--no-whole-archive hdfs/libhdfs.a -L$JAVA_HOME/jre/lib/amd64"
HDFS_LDFLAGS="$HDFS_LDFLAGS -Wl,--no-whole-archive -lhdfs -L$JAVA_HOME/jre/lib/amd64"
HDFS_LDFLAGS="$HDFS_LDFLAGS -L$JAVA_HOME/jre/lib/amd64/server -L$GLIBC_RUNTIME_PATH/lib"
HDFS_LDFLAGS="$HDFS_LDFLAGS -ldl -lverify -ljava -ljvm"
COMMON_FLAGS="$COMMON_FLAGS $HDFS_CCFLAGS"
Expand Down
13 changes: 5 additions & 8 deletions hdfs/README
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
This directory contains the hdfs extensions needed to make rocksdb 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 rocksdb.
It has been compiled and testing against CDH 4.4 (2.0.0+1475-1.cdh4.4.0.p0.23~precise-cdh4.4.0).

The configuration assumes that packages libhdfs0, libhdfs0-dev are
installed which basically means that hdfs.h is in /usr/include and libhdfs in /usr/lib

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

If you want to compile rocksdb with hdfs support, please set the following
enviroment variables appropriately:
enviroment variables appropriately (also defined in setup.sh for convenience)
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
Expand Down
2 changes: 1 addition & 1 deletion hdfs/env_hdfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "rocksdb/status.h"

#ifdef USE_HDFS
#include "hdfs/hdfs.h"
#include <hdfs.h>

namespace rocksdb {

Expand Down
Loading

0 comments on commit 62d2b92

Please sign in to comment.