-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-13095. Support sorting by most/least used nodes in ozone admin datanode list
#8520
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
|
This might conflict with #8523, let's wait until that one is merged. |
siddhantsangwan
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.
Trying to understand the use case here. Are we trying to make this command have usage information so users don't need to use two different commands, list and usageinfo?
The jira isn't clear to me.
CLI options We are not trying to remove |
|
yes your right @errose28 should we keep CLI options |
|
@siddhantsangwan we are trying to move our datanode CLI to the same In context of this change, any options that deal with sorting a list should be under the |
|
This PR can be reviewed first since #8523 is under discussion. |
Tejaskriya
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 the patch @sreejasahithi , overall looks good, just a suggestion below for the tests
.../cli-admin/src/test/java/org/apache/hadoop/hdds/scm/cli/datanode/TestListInfoSubcommand.java
Show resolved
Hide resolved
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.
Thanks for the patch, @sreejasahithi. It looks good, I have some minor comments inline.
...zone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/ListInfoSubcommand.java
Show resolved
Hide resolved
...zone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/ListInfoSubcommand.java
Outdated
Show resolved
Hide resolved
...zone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/ListInfoSubcommand.java
Outdated
Show resolved
Hide resolved
...zone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/ListInfoSubcommand.java
Outdated
Show resolved
Hide resolved
...zone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/ListInfoSubcommand.java
Show resolved
Hide resolved
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.
Thanks for addressing the comments @sreejasahithi, LGTM!
|
Thanks for the patch @sreejasahithi , and the reviews @aryangupta1998 @siddhantsangwan @errose28 |
What changes were proposed in this pull request?
This change introduces new CLI options
--most-usedand--least-usedunder theozone admin datanode listcommand to enable sorting datanodes based on their usage. When these options are used, the output includes additional details such as used space, total capacity, and percentage of space used.Unit tests for this change are added in
TestListInfoSubcommand.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13095
How was this patch tested?
sample outputs when
--most-usedflag is used:When json flag is not given:
https://github.com/sreejasahithi/ozone/actions/runs/15297558597