-
Notifications
You must be signed in to change notification settings - Fork 591
HDDS-13098. Create PicoCLI mixin to standardize datanode selection options #8674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
aryangupta1998
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to me!
If user enters a current value and a deprecated value like,
ozone admin datanode usageinfo --node-id X --uuid Y
then we should be able to warn users!
...one/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/UsageInfoSubcommand.java
Outdated
Show resolved
Hide resolved
...zone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/NodeSelectionMixin.java
Outdated
Show resolved
Hide resolved
The options --node-id and --uuid are mutually exclusive, meaning only one of them can be specified at a time. They will receive the following error message: |
sarvekshayr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @sreejasahithi.
In TestDecommissionStatusSubCommand, the current tests cover the deprecated --id option, but there's no test for the --node-id option.
Could you please add a test case to cover --node-id as well?
...dmin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DecommissionStatusSubCommand.java
Show resolved
Hide resolved
6716662 to
dd89a7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @sreejasahithi , please find my comments below
Also I think you can try updating your branch with the latest master, the test failures seem unrelated to your changes, it may get resolved.
...zone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/NodeSelectionMixin.java
Outdated
Show resolved
Hide resolved
...dmin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DecommissionStatusSubCommand.java
Show resolved
Hide resolved
…ostname not supported for decommission status command
aryangupta1998
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Thanks for the patch @sreejasahithi , and for the reviews @sarvekshayr @aryangupta1998 |
What changes were proposed in this pull request?
Introduced a reusable PicoCLI mixin (NodeSelectionMixin) to standardize datanode selection options across commands. This includes:
Deprecated older/ambiguous options like --id, --uuid, and --address for clarity and consistency, while retaining them in hidden mode to preserve backward compatibility.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13098
How was this patch tested?
https://github.com/sreejasahithi/ozone/actions/runs/15778605382