首页 > 代码库 > fuse on TDH4.8

fuse on TDH4.8

一、安装依赖包

yum install autoconf.noarch

yum install automake

yum install libtool*

yum install m4

yum install fuse*

二、写脚本 /root/wrapper_hdfs_fuse 

for jar in `find /usr/lib/hadoop /usr/lib/hadoop-hdfs -name "*.jar"`
do
  jars=$jars:$jar
done
export LD_LIBRARY_PATH=/usr/lib/hadoop/lib/native:/usr/java/latest/jre/lib/amd64/server:$LD_LIBRARY_PATH
export CLASSPATH=$jars
nohup /usr/lib/hadoop/bin/fuse_dfs $@ &

 

三 、新建目录

mkdir /mnt/hdfs

四、执行命令 主机172.16.1.34

sh /root//wrapper_hdfs_fuse -onotrash -oserver=tdh4 -oport=8020 rw /mnt/hdfs

 

此时 ls  /mnt/hdfs 就能看的hdfs的目录和文件了

fuse on TDH4.8