Skip to content

HDDS-16385. Minor cleanups in NodeDecommissionManager - #11211

Open
navinko wants to merge 1 commit into
apache:masterfrom
navinko:HDDS-16385
Open

HDDS-16385. Minor cleanups in NodeDecommissionManager#11211
navinko wants to merge 1 commit into
apache:masterfrom
navinko:HDDS-16385

Conversation

@navinko

@navinko navinko commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fix typo and remove redundant list copy in NodeDecommissionManager.

  1. In NodeDecommissionManager.parseHostname(), the InvalidHostStringException message has a typo — "does not contain a value hostname or hostname:port definition" should read "a valid hostname".
  2. In NodeDecommissionManager.checkIfMaintenancePossible(), the list copy is redundant
    List<DatanodeDetails> validDns = dns.stream().collect(Collectors.toList());
    Followed by Collections.copy(validDns, dns);
    Which copies dns twice, and should be simplified to List<DatanodeDetails> validDns = new ArrayList<>(dns);
    Which is matching with other implementations like checkIfDecommissionPossible() definition.

What is the link to the Apache JIRA

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

How was this patch tested?

No behaviour changes, Ran existing unit tests in TestNodeDecommissionManager
Successful CI Build : https://github.com/navinko/ozone/actions/runs/33965658546

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the patch! @navinko +1 LGTM.

@navinko

navinko commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the patch! @navinko +1 LGTM.

Thanks @chihsuan for the review.

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