Skip to content

Commit c2fda55

Browse files
author
Mike Orr
committed
hdfs cleanup and compile test against CDH 4.4.
1 parent bd1105a commit c2fda55

File tree

7 files changed

+52
-497
lines changed

7 files changed

+52
-497
lines changed

build_tools/build_detect_platform

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ if test "$USE_HDFS"; then
289289
exit 1
290290
fi
291291
HDFS_CCFLAGS="$HDFS_CCFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -DUSE_HDFS"
292-
HDFS_LDFLAGS="$HDFS_LDFLAGS -Wl,--no-whole-archive hdfs/libhdfs.a -L$JAVA_HOME/jre/lib/amd64"
292+
HDFS_LDFLAGS="$HDFS_LDFLAGS -Wl,--no-whole-archive -lhdfs -L$JAVA_HOME/jre/lib/amd64"
293293
HDFS_LDFLAGS="$HDFS_LDFLAGS -L$JAVA_HOME/jre/lib/amd64/server -L$GLIBC_RUNTIME_PATH/lib"
294294
HDFS_LDFLAGS="$HDFS_LDFLAGS -ldl -lverify -ljava -ljvm"
295295
COMMON_FLAGS="$COMMON_FLAGS $HDFS_CCFLAGS"

hdfs/README

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
This directory contains the hdfs extensions needed to make rocksdb store
22
files in HDFS.
33

4-
The hdfs.h file is copied from the Apache Hadoop 1.0 source code.
5-
It defines the libhdfs library
6-
(http://hadoop.apache.org/common/docs/r0.20.2/libhdfs.html) to access
7-
data in HDFS. The libhdfs.a is copied from the Apache Hadoop 1.0 build.
8-
It implements the API defined in hdfs.h. If your hadoop cluster is running
9-
a different hadoop release, then install these two files manually from your
10-
hadoop distribution and then recompile rocksdb.
4+
It has been compiled and testing against CDH 4.4 (2.0.0+1475-1.cdh4.4.0.p0.23~precise-cdh4.4.0).
5+
6+
The configuration assumes that packages libhdfs0, libhdfs0-dev are
7+
installed which basically means that hdfs.h is in /usr/include and libhdfs in /usr/lib
118

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

1512
If you want to compile rocksdb with hdfs support, please set the following
16-
enviroment variables appropriately:
13+
enviroment variables appropriately (also defined in setup.sh for convenience)
1714
USE_HDFS=1
1815
JAVA_HOME=/usr/local/jdk-6u22-64
1916
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

hdfs/env_hdfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "rocksdb/status.h"
1515

1616
#ifdef USE_HDFS
17-
#include "hdfs/hdfs.h"
17+
#include <hdfs.h>
1818

1919
namespace rocksdb {
2020

0 commit comments

Comments
 (0)