[
https://issues.apache.org/jira/browse/AMBARI-26662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Himanshu Maurya updated AMBARI-26662:
-------------------------------------
Description:
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.
was:
h2. Summary
The {{capacity-scheduler.xml}} properties on the YARN Advanced Configs tab were
rendered as one input field per property, which does not match the classic
Ember UI's dedicated combined-textarea editor and made bulk edits
(adding/removing queues, editing multiple properties at once) awkward and
error-prone. Saving a {{capacity-scheduler.xml}} change also silently skipped
the "Refresh YARN Queues" prompt that the classic UI shows, so the new
configuration was not actually applied to the running ResourceManager until a
manual refresh.
h2. Changes
* {{capacity-scheduler.xml}} properties are now edited as a single combined
{{{}key=value{}}}-per-line textarea, folded into the existing
"CapacityScheduler" section (displayed as "Scheduler") instead of being
rendered as their own separate accordion item with one field per property. This
matches the classic Ember UI's {{App.CapacitySceduler}} widget.
* Editing the textarea parses each {{key=value}} line back into the individual
property map: existing properties are updated in place, new lines add new
properties (cloned from an existing property's metadata), and removed lines
delete the corresponding property.
* After successfully saving configs, if any of the saved changes touched
{{{}capacity-scheduler.xml{}}}, a confirmation popup now prompts the user to
"Refresh YARN Queues." Accepting submits a YARN {{REFRESHQUEUES}} action
against all hosts running the ResourceManager component, matching the classic
UI's {{ComponentActionsByConfigs#showPopup}} behavior.
h2. Impact
Capacity Scheduler queue configuration can now be edited in bulk via a single
textarea (matching the classic UI's editing experience), and saved changes are
properly propagated to the running ResourceManager via the Refresh YARN Queues
prompt instead of requiring a manual follow-up action.
> Ambari Web React: Fix HDFS NameNode/ZKFC summary labels and incorrect
> federation detection
> ------------------------------------------------------------------------------------------
>
> Key: AMBARI-26662
> URL: https://issues.apache.org/jira/browse/AMBARI-26662
> Project: Ambari
> Issue Type: Story
> Reporter: Himanshu Maurya
> Assignee: Himanshu Maurya
> Priority: Major
> 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]