Skip to content

HDDS-15491. [DiskBalancer] Preserve datanode order in status command output.#10450

Open
slfan1989 wants to merge 1 commit into
apache:masterfrom
slfan1989:HDDS-15491
Open

HDDS-15491. [DiskBalancer] Preserve datanode order in status command output.#10450
slfan1989 wants to merge 1 commit into
apache:masterfrom
slfan1989:HDDS-15491

Conversation

@slfan1989
Copy link
Copy Markdown
Contributor

@slfan1989 slfan1989 commented Jun 6, 2026

What changes were proposed in this pull request?

This PR preserves the datanode order in the non-JSON output of the DiskBalancer status command.

The DiskBalancer status command executes requests in the order provided by the user, or in the order resolved by --in-service-datanodes. However, the non-JSON status output previously collected successful responses from ConcurrentHashMap.values(), which does not guarantee iteration order.

As a result, the displayed status rows could appear in a different order from the input datanode list. This PR updates the rendering path to build the status result list according to the ordered successNodes list instead.

The PR also updates the CLI unit test to verify that status output preserves the requested datanode order.

What is the link to the Apache JIRA

HDDS-15491. [DiskBalancer] Preserve datanode order in status command output.

How was this patch tested?

Add Junit Test.

CI: https://github.com/slfan1989/ozone/actions/runs/27052253038

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.

1 participant