我有一个使用 VMware 工作站的独立 hadoop 设置。我可以使用以下命令启动 hadoop ./start-dfs.sh ./start-yarn.sh
这是 hdfs-site.xml
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hduser/mydata/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hduser/mydata/hdfs/datanode</value>
</property>
现在,我已经获得了一个我想要指向的单独的 dfs 目录。请注意,此 dfs 目录包含名称节点、数据节点和辅助数据节点等目录。我使用这篇文章作为参考(https://community.hortonworks.com/articles/2308/how-to-move-or-change-the-hdfs-datanode-directorie.html)
但是在将 hdfs-site.xml 配置为新节点(在路径 mynewdatanode 中)之后,如下所示
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/hduser/mynewdata/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/hduser/mynewdata/hdfs/datanode</value>
</property>
我使用上述配置启动了 hadoop,但我看到连接被拒绝错误
hduser@ubuntu:/usr/local/hadoop/sbin$ hdfs dfs -ls /wordcount/
ls: Call From ubuntu/192.168.52.143 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
请问有什么指点吗?非常感激。