1

如何设置 Hadoop HDFS 应该监听的 IP 地址?目前,当我跑步时,netstat我看到它在127.0.0.1:9000. 这使得集群中的另一个节点无法访问 HDFS。我connection refused error在运行应用程序时得到。

我希望它显示为my-machine-name:9000而不是127.0.0.1:9000. 我的core-site.xml文件是

<property>
      <name>fs.defaultFS</name>
      <value>my-machine-name:9000/</value>
</property>
4

1 回答 1

0

/etc/host在本地计算机(客户端节点)上的文件中添加/编辑此行

127.0.0.1 localhost my-machine-name

同样,将此行添加到您的集群节点/etc/hosts,其中 198.1.1.1 是客户端节点的公共 IP(此命令应该为您提供公共 IP:ipconfighostname -i- 确保在客户端节点上运行它)

198.1.1.1 my-machine-name
于 2016-07-25T01:28:29.820 回答