Skip to main content
rda3mon
Silver ⭐️⭐️
Mar 7, 2020 5:06 PM UTC
Solved

How to refresh HDFS rack topology changes without restarting namenodes

After adding new datanodes to the existing cluster and updating topology file. I am not able to refresh the namenode to pick up rack of the new node. It puts under `/default-rack`.

 

Anyway to refresh the rack topology changes without restarting namenodes? 

venkatsambath
Gold ⭐️⭐️⭐️
Mar 8, 2020 7:25 AM UTC

@rda3mon Currently the feature you are looking for is not available, but for future version there is a jira in place - https://issues.apache.org/jira/browse/HDFS-11242

4 replies

venkatsambath
Gold ⭐️⭐️⭐️
Gold ⭐️⭐️⭐️
Mar 8, 2020 7:25 AM UTC

@rda3mon Currently the feature you are looking for is not available, but for future version there is a jira in place - https://issues.apache.org/jira/browse/HDFS-11242

Translate
rda3mon
rda3monAuthor
Silver ⭐️⭐️
Mar 8, 2020 1:37 PM UTC

Thanks for pointing me to the patch. 

Translate
rda3mon
rda3monAuthor
Silver ⭐️⭐️
Mar 9, 2020 1:58 AM UTC

For those who are looking for hdfs behind hbase solution. You can use Hbase favored node rack awareness, which depends on hdfs "net.topology.script.file.name" and more importantly refreshes dynamically. That worked for me perfectly. 

Translate
royliang
Silver ⭐️
Jul 25, 2024 7:43 AM UTC

The correct process for adding a new node with the correct mapping is:

1. Update the topology file of the new DN.
2. Issue dfadmin-refreshnodes to update the new topology map in the NN.
3. Start DN only after (2) so that it picks up the correct mapping and the default mapping is not cached.

Translate