You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2024/12/06 21:13:31 UTC
[PR] HDDS-11830. Subcommands should not extend GenericCli [ozone]
adoroszlai opened a new pull request, #7537:
URL: https://github.com/apache/ozone/pull/7537
## What changes were proposed in this pull request?
Subcommands should not extend `GenericCli`, it is required only for top-level commands.
https://issues.apache.org/jira/browse/HDDS-11830
## How was this patch tested?
- Verified that parent commands (`ozone admin` and `ozone debug`) display these subcommands in their help.
- Verified that the subcommands show help when invoked without options.
```
$ cd hadoop-ozone/dist/target/ozone-2.0.0-SNAPSHOT
$ bin/ozone admin
Incomplete command
Usage: ozone admin [-hV] [--verbose] [-conf=<configurationPath>]
[-D=<String=String>]... [COMMAND]
Developer tools for Ozone Admin operations
-conf=<configurationPath>
-D, --set=<String=String>
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
--verbose More verbose output. Show the stack trace of the errors.
Commands:
...
namespace Namespace Summary specific admin operations
om Ozone Manager specific admin operations
...
scm Ozone Storage Container Manager specific admin operations
$ bin/ozone admin namespace
Missing required subcommand
Usage: ozone admin namespace [-hV] [COMMAND]
Namespace Summary specific admin operations
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
summary Get entity type and object counts for a path request.
du Get disk usage for a path request.
quota Get quota usage for a path request.
dist Get file size distribution for a path request.
$ bin/ozone admin om
Missing required subcommand
Usage: ozone admin om [-hV] [COMMAND]
Ozone Manager specific admin operations
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
finalizeupgrade Finalizes Ozone Manager's metadata
changes and enables new features
after a software upgrade.
It is possible to specify the
service ID for an HA environment,
or the Ozone manager host in a
non-HA environment, if none
provided the default from
configuration is being used if
not ambiguous.
...
$ bin/ozone admin scm
Missing required subcommand
Usage: ozone admin scm [-hV] [COMMAND]
Ozone Storage Container Manager specific admin operations
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
roles List all SCMs, their respective Ratis server roles and
RaftPeerIds
finalizeupgrade Finalize SCM Upgrade
finalizationstatus Finalization SCM Status
transfer Manually transfer the raft leadership to the target node.
deletedBlocksTxn SCM deleted blocks transaction specific operations
decommission Decommission SCM <scmid>. Includes removing from ratis
ring and removing its certificate from certStore
rotate CLI command to force generate new keys (rotate)
$ bin/ozone debug
Incomplete command
Usage: ozone debug [-hV] [--verbose] [-conf=<configurationPath>]
[-D=<String=String>]... [COMMAND]
Developer tools for Ozone Debug operations
-conf=<configurationPath>
-D, --set=<String=String>
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
--verbose More verbose output. Show the stack trace of the errors.
Commands:
...
ratislogparser Shell of printing Ratis Log in understandable text
$ bin/ozone debug ratislogparser
Missing required subcommand
Usage: ozone debug ratislogparser [-hV] [COMMAND]
Shell of printing Ratis Log in understandable text
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
datanode dump datanode segment file
generic dump generic ratis segment file
om dump om ratis segment file
scm dump scm ratis segment file
```
CI:
https://github.com/adoroszlai/ozone/actions/runs/12205055763
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11830. Subcommands should not extend GenericCli [ozone]
Posted by "nandakumar131 (via GitHub)" <gi...@apache.org>.
nandakumar131 commented on PR #7537:
URL: https://github.com/apache/ozone/pull/7537#issuecomment-2524964045
Thanks @adoroszlai for the contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11830. Subcommands should not extend GenericCli [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7537:
URL: https://github.com/apache/ozone/pull/7537#issuecomment-2524982008
Thanks @nandakumar131 for reviewing and merging this.
> can we also merge `GenericParentCommand` & `ExtensibleParentCommand`
Created HDDS-11878 to get rid of `GenericParentCommand`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11830. Subcommands should not extend GenericCli [ozone]
Posted by "nandakumar131 (via GitHub)" <gi...@apache.org>.
nandakumar131 commented on PR #7537:
URL: https://github.com/apache/ozone/pull/7537#issuecomment-2524963913
@adoroszlai, can we also merge `GenericParentCommand` & `ExtensibleParentCommand` and only use specific sub-command interface to load all the commands?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-11830. Subcommands should not extend GenericCli [ozone]
Posted by "nandakumar131 (via GitHub)" <gi...@apache.org>.
nandakumar131 merged PR #7537:
URL: https://github.com/apache/ozone/pull/7537
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org