Himanshu Maurya created AMBARI-26666:
----------------------------------------

             Summary: Support bulk Recover Hosts action from the Hosts List 
page in Ambari Web (React)
                 Key: AMBARI-26666
                 URL: https://issues.apache.org/jira/browse/AMBARI-26666
             Project: Ambari
          Issue Type: Story
            Reporter: Himanshu Maurya
            Assignee: Himanshu Maurya
             Fix For: 3.1.0


h2. Summary

The HDFS service summary in the React "Modern UI" had two related display bugs:
 # In the non-federated (single-nameservice) HA view, each NameNode tile always 
showed the literal HA state string concatenated with {{NAMENODE}} (e.g. 
{{{}active NAMENODE{}}}, {{{}standby NAMENODE{}}}) instead of a properly cased 
label, and never accounted for the {{observer}} HA state introduced by 
consistent-read observer NameNodes — it fell through to the same raw string. 
The ZKFC tile for each NameNode's host was also rendered as a separate block 
below all NameNode tiles instead of being grouped next to its NameNode, unlike 
the classic Ember UI's {{getGroupedMasterComponents}} layout.
 # HDFS federation detection ({{{}useHDFSConfigUpdater{}}}) derived its 
namespace groups from the {{dfs.nameservices}} config property rather than from 
the NameNodes actually installed and reporting HA state. A nameservice declared 
in {{hdfs-site.xml}} but not yet populated with a running NameNode (e.g. 
mid-rollout, or an observer-only nameservice) was still counted as a distinct 
namespace, incorrectly flipping the summary into the federated topology view 
and causing component counts (including DataNode) to be computed against the 
wrong grouping.

h2. Changes
 * {{{}screens/Services/ServiceComponents.tsx{}}}:
 ** Added a {{getNameNodeLabel(haStatus)}} helper (mirrors Ember's 
{{{}display_name_advanced{}}}) mapping 
{{{}active{}}}/{{{}standby{}}}/{{{}observer{}}} HA states to proper display 
labels, falling back to the generic "NameNode" label for unknown/empty states.
 ** Merged the ZKFC tile into the NameNode tile loop so each ZKFC renders 
immediately after the NameNode on the same host, removing the separate, 
disconnected ZKFC {{.map()}} block.
 * {{{}screens/messages.ts{}}}, {{{}locales/en/translation.json{}}}, 
{{{}locales/zh/translation.json{}}}:
 ** Added the {{services.service.summary.nameNode.observer}} translation key 
(English "Observer NameNode" / Chinese "观察者 NameNode") in all three places the 
app's i18n layer reads from — {{translate()}} resolves through i18next's loaded 
{{translation.json}} resources first, so the key needed adding there, not just 
in the {{messages.ts}} fallback map.
 * {{{}hooks/useHDFSConfigUpdater.ts{}}}:
 ** Added a {{buildNameNodeGroups(nameNodes, nameSpacePath)}} helper that 
groups NameNodes into namespace groups using the {{haNameSpace}} tag already 
resolved onto each NameNode host component, rather than deriving groups 
directly from the {{dfs.nameservices}} property list.
 ** Applied this helper in both {{inferNamespace()}} (the config-driven pass) 
and the poll-driven {{federationNamespaces}} recomputation, so the two paths 
stay consistent — the poll path previously used the raw {{dfs.nameservices}} 
parsing on every poll, which would have reintroduced a discarded/unpopulated 
nameservice as soon as the next poll ran.
 * {{{}screens/Services/ServiceComponents.test.tsx{}}}:
 ** Added coverage for the HDFS summary path (previously untested): NameNode 
HA-state label resolution paired with its host's ZKFC, and a regression test 
confirming a declared-but-unpopulated namespace no longer flips the view into 
the federated layout.

h2. Impact

HDFS summary tiles now show the correct Active/Standby/Observer NameNode label 
(translated correctly in both bundled locales) and group the ZKFC status with 
its NameNode, and HDFS federation topology detection reflects only nameservices 
with actually installed/reporting NameNodes — a declared-but-unpopulated 
nameservice no longer causes the UI to incorrectly render the federated layout 
or miscompute component counts.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to