Hadoop:如何正确停用集群上的节点?

Hadoop: how to correctly decommission nodes on cluster?

我一直在尝试通过遵循这个解决方案 change number of data nodes in Hadoop 和这个有用的 post [= 来更改我的 Hadoop 集群中的节点数量(总共 5 个节点,包括 1 个主节点和 4 个工作节点) 33=]Hadoop集群中Datanode的启用和停用

现在我可以看到在 HDFS 上我已经成功地停用了一个节点: HDFS screenshot

我在我的 hdfs-site.xml 中设置了一个排除文件 属性 hdfs.xml screenshot as well as yarn-site.xml yarn-site.xml screenshot which includes the ip address of the node that I want to decommission. Like follow: excludes file

我还完成了刷新节点命令。

最后我 运行 hadoop dfsadmin –report 并且我可以看到该节点实际上已退役:nodes report

但是,在 MapReduce 集群指标上,我发现有 5 个活动节点,已在 HDFS 上停用的节点未在此处的停用节点中识别

参见:hadoop cluster metrics

这是为什么?

当我更改排除文件中的主机名时,问题解决了。节点名称不应包含任何端口号