Trying to use Fuse to mount HDFS. Can't compile libhdfs

醉酒当歌 提交于 2019-12-08 03:13:26
SachinJ

If you are using cloudera hadoop(cdh3u2), you dont need to build the fuse project.

you can find the binary(libhdfs.so*) inside the directory $HADOOP_HOME/c++/lib

Before fuse mount update the "$HADOOP_HOME/contrib/fuse-dfs/src/fuse_dfs_wrapper.sh" as follows

HADOOP_HOME/contrib/fuse-dfs/src/fuse_dfs_wrapper.sh

#!/bin/bash

for f in ${HADOOP_HOME}/hadoop*.jar ; do
   export CLASSPATH=$CLASSPATH:$f
done

for f in ${HADOOP_HOME}/lib/*.jar ; do
   export CLASSPATH=$CLASSPATH:$f
done

export PATH=$HADOOP_HOME/contrib/fuse-dfs:$PATH
export LD_LIBRARY_PATH=$HADOOP_HOME/c++/lib:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server/
fuse_dfs $@

LD_LIBRARY_PATH contains the list of directories here
"$HADOOP_HOME/c++/lib" contains libhdfs.so and
"/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server/" contains libjvm.so \# modify /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server/ as your java_home

Use the following command for mounting hdfs

fuse_dfs_wrapper.sh dfs://localhost:9000/ /home/510600/mount1

for unmounting use the following command

fusermount  -u /home/510600/mount1 

I tested fuse only in hadoop pseudo mode not in cluster mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!