adoroszlai commented on code in PR #7526:
URL: https://github.com/apache/ozone/pull/7526#discussion_r1872932651
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java:
##########
@@ -63,25 +61,11 @@ public GenericCli(Class<?> type) {
});
if (type != null) {
- addSubcommands(getCmd(), type);
+ SubcommandWithParent.addSubcommands(getCmd(), type);
}
ExtensibleParentCommand.addSubcommands(cmd);
Review Comment:
Thanks @nandakumar131 for reviewing this.
This PR moves all known subcommands (in this repo) to the fine-grained
interface. So we could simply drop `SubcommandWithParent` here. Instead, I
kept the existing logic as deprecated to not break behavior for subcommands we
don't know about (used privately).
On another look, `SubcommandWithParent` support was dropped for `ozone
admin` in HDDS-11831 and for `ozone sh` in HDDS-11822.
I kind of plan to make another change where `type` is simply passed from
`GenericCli` constructor as `getClass()`, instead of requiring all subclasses
to pass their own `.class`. That would restore behavior for `ozone admin` and
`ozone sh`, too.
What do you think?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]