通过nfs3将hdfs挂载到本地

本文介绍如何配置并启动Hadoop HDFS NFS Gateway,包括必要的Hadoop配置文件修改,如core-site.xml和hdfs-site.xml。此外还详细说明了启动步骤及挂载过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.启动hdfs  

   start-dfs.sh (启动后使用jps查看进程是否启动)

2.执行hdfs portmap starthdfs nfs3 start

   使用jps查看portmap和nfs3是否启动

3.执行mount -t nfs -o vers=3,proto=tcp,nolock 10.211.55.38:/ /hdfs

   挂载到本地目录

 

 

 

备注:

hadoop配置修改

 

1.core-site.xml

 

<property>

  <name>hadoop.proxyuser.root.groups</name>

  <value>*</value>

  <description>

         The 'nfsserver' user is allowed to proxy all members of the 'nfs-users1' and 

         'nfs-users2' groups. Set this to '*' to allow nfsserver user to proxy any group.

  </description>

</property>

 

<property>

  <name>hadoop.proxyuser.root.hosts</name>

  <value>*</value>

  <description>

         This is the host where the nfs gateway is running. Set this to '*' to allow

         requests from any hosts to be proxied.

  </description>

</property>

 

2.hdfs-site.xml

 

<property>

  <name>dfs.namenode.accesstime.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.nfs3.dump.dir</name>

 

<value>/tmp/.hdfs-nfs</value>

 

 

3.log4j.properties

 

log4j.logger.org.apache.hadoop.hdfs.nfs=DEBUG

 

log4j.logger.org.apache.hadoop.oncrpc=DEBUG

 

 

 

 

转载于:https://www.cnblogs.com/qhg1/p/4329697.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值