Skip to content

HDDS-15351. Display datanode UUID in Datanode web UI#10357

Open
chihsuan wants to merge 3 commits into
apache:masterfrom
chihsuan:HDDS-15351
Open

HDDS-15351. Display datanode UUID in Datanode web UI#10357
chihsuan wants to merge 3 commits into
apache:masterfrom
chihsuan:HDDS-15351

Conversation

@chihsuan
Copy link
Copy Markdown
Contributor

@chihsuan chihsuan commented May 25, 2026

What changes were proposed in this pull request?

This PR makes the DataNode web UI display the DataNode UUID.

Some operational commands (e.g. decommission) require the DataNode UUID, but previously there was no easy way to look it up from the web UI. This change exposes the UUID through the DataNode's JMX MXBean and renders it on the DataNode overview page.

Changes:

  • DNMXBean / DNMXBeanImpl: add a datanodeUuid field with a getter/setter, following the existing hostName pattern. This exposes the UUID as the JMX attribute DatanodeUuid.
  • HddsDatanodeService: during startup, set the UUID on the MXBean from datanodeDetails.getUuidString() (after the DataNode details are initialized, so the value is always present).
  • overview.html (the shared framework overview template): add a Datanode UUID row, guarded by ng-if="$ctrl.jmx.DatanodeUuid" so it only renders on the DataNode UI. SCM/OM do not expose that JMX attribute, so the row is hidden there.

Note: the SCM web UI already shows the UUID (Node Status -> UUID column), so only the DataNode side needed changes here.

Screenshot 2026-05-25 at 9 48 33 PM

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15351

How was this patch tested?

Unit test: Added TestHddsDatanodeService#testDatanodeUuidInMXBean, which starts the service, reads the DatanodeUuid attribute from the JMX MXBean, and asserts it matches datanodeDetails.getUuidString().

Manual UI verification:

# from repo root
mvn clean install -DskipTests

cd hadoop-ozone/dist/target/ozone-*/compose/ozone
docker compose up -d --scale datanode=3
  • DataNode UI (ports are dynamically mapped):
    docker compose ps datanode
    # or compose v2:
    docker compose port --index 1 datanode 19864
    Open the returned host/port (e.g. http://localhost:<mapped-port>). The overview table now shows the new row Datanode UUID.
Screenshot 2026-05-25 at 10 09 14 PM

@chihsuan chihsuan marked this pull request as ready for review May 25, 2026 14:23
Copy link
Copy Markdown
Contributor

@sreejasahithi sreejasahithi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chihsuan for this improvement
LGTM

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