Skip to content

[AMBARI-26616] Refresh rack topology mappings upon DataNode or NodeManager install#4139

Open
goyalanurag wants to merge 4 commits into
apache:trunkfrom
goyalanurag:AMBARI-26616
Open

[AMBARI-26616] Refresh rack topology mappings upon DataNode or NodeManager install#4139
goyalanurag wants to merge 4 commits into
apache:trunkfrom
goyalanurag:AMBARI-26616

Conversation

@goyalanurag

@goyalanurag goyalanurag commented Jun 10, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

When adding DataNode or NodeManager hosts, Ambari refreshes include/exclude files on NameNode and ResourceManager hosts, but the rack topology mapping file can remain stale because topology regeneration only runs on hosts where worker components are started. This requires restarting NameNode or ResourceManager before new hosts appear with the correct rack information.

Update the HDFS and YARN refresh/decommission workflows to regenerate topology_mappings.data during the existing Update Include/Exclude Files action, so hdfs dfsadmin -printTopology, hdfs dfsadmin -report, and yarn node -status reflect newly added hosts without restarting master components.

How was this patch tested?

Tested manually multiple times by adding DataNodes and NodeManagers to Hadoop cluster.
Below screenshots are before/after adding a worker (DataNode + NodeManager) to cluster.

Before Adding Worker

hdfs-before mappings-before yarn-before

After Adding Worker

ambari-action hdfs-after mappings-after yarn-after

@brahmareddybattula

Copy link
Copy Markdown
Contributor

@goyalanurag thanks for reporting on this, approach looks good to me.. could you please add the UT for this and attach manual test snippets.?

@goyalanurag

Copy link
Copy Markdown
Author

I have update the description with some screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants