Search code examples
hadoop2bigdata

How to remove datanode entry in hadoop UI after decommissioning it


I have tried the below procedure to decommission the datanode.

1) added the node to be decommissioned in /tmp/exclude file.

2) added below tags in hdfs-site.xml and yarn-site.xml respectively

`<property>
    <name>dfs.hosts.exclude</name>
    <value>/tmp/exclude</value>
    <final>true</final>
    </property>`


`<property>
    <name>yarn.resourcemanager.nodes.exclude-path</name>
    <value>/tmp/exclude</value>
    <final>true</final> 
</property>`

3)executed below commands as "hadoop" user

`hdfs dfsadmin -refreshNodes
   yarn rmadmin -refreshNodes`.

Datanode got decommissioned and showing the node is "decommissioned" in UI. how can i permanently remove the node from UI??.

I tried "Namenode" service restart But dint worked.


Solution

  • Though the node is decommissioned, it continues to send heartbeats to the master,

    • Stop the Datanode and NodeManager process in the decommissioned node.
    • Then restart the Namenode.

    And To remove the node entirely from any future start and stop process,

    • Remove the node entry from slaves file as well.