使用Fuse挂载HDFS
前提,已经安装好hadoop集群
1.安装fuse
这里可以编译安装或yum安装
yum install fuse fuse-libs fuse-devel
2.安装ant
使用yum安装
yum install ant
3.添加系统配置
vi/etc/profile,视自己的实际情况进行设置
export OS_ARCH=amd64 export OS_BIT=64 export JAVA_HOME=/usr/java/jdk1.6.0_26 export CLASSPATH=,:$JAVA_HOME/lib export HADOOP_HOME=/usr/local/hadoop-0.20.2 export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/$OS_ARCH/server:$HADOOP_HOME/c++/Linux-$OS_ARCH-$OS_BIT/lib:/usr/local/lib:/usr/lib source /etc/profile
4.进行编译
cd $HADOOP_HOME ant compile-c++-libhdfs -Dlibhdfs=1 -Dcompile.c++=1 ln -s c++/Linux-$OS_ARCH-$OS_BIT/lib build/libhdfs ant compile-contrib -Dlibhdfs=1 -Dfusedfs=1
5.测试
启动hadoop集群后,
mkdir /mnt/dfs cd $HADOOP_HOME/build/contrib/fuse-dfs ./fuse_dfs_wrapper.sh dfs://namenode:9000 /mnt/dfs/ ls /mnt/dfs/
相关推荐
swift 2011-04-25
wenshifang 2010-08-27
ISEESTARS 2012-08-28
蜀川居 2012-07-11
lnsoftware 2012-01-15
89284750 2019-06-20
wangol 2015-11-16
MARQUIS 2015-09-22
mensiler 2015-07-29
fulinux 2012-03-01
清风了了 2018-06-01
kkvvll 2018-05-16
shenhongdb 2013-10-17
katnisswuyuechen 2013-12-05
小金屋 2015-04-02
camper00 2012-08-09