需要解决两个问题,一是如何启动portmap和nfs网关,二是如何在客户端挂载hdfs;
以下适用于ubuntu 10.04系统及hadoop 2.2.0;
启动portmap和nfs网关
编译源码后启动nfs网关需要拷贝的文件目录
hadoop-common-project/hadoop-nfs/target/hadoop-nfs-2.2.0
hadoop-hdfs-project/hadoop-hdfs-nfs/target/hadoop-hdfs-nfs-2.2.0
配置(非必须,可以方便以后根据应用进行参数调整)
在hdfs-site.xml中,加入以下内容:
<property>
<name>dfs.access.time.precision</name>
<value>3600000</value>
<description>The access time for HDFS file is precise upto this value.
The default value is 1 hour. Setting a value of 0 disables
access times for HDFS.
</description>
</property>
<property>
<name>dfs.datanode.max.xcievers</name>
<value>1024</value>
</property>