xBis7 opened a new pull request, #3835: URL: https://github.com/apache/ozone/pull/3835
## What changes were proposed in this pull request? In order to make the CLI and `ozone admin datanode` subcommands, more consistent, added the hostname as a parameter to the commands that didn't accept it. These commands were `usageinfo` and `list info`. There is an hdfs flag `dfs.datanode.use.datanode.hostname` checked by the SCMNodeManager during start up and if it's true then we can get the datanode info by providing the hostname with the --ip pamameter, while ip will not be available anymore. The default case is keeping the flag's value to false where the ip is available but not the hostname. If we add the --hostname parameter and keep the flag, then it's confusing for the user. In such a case we could get the usage info by specifying the hostname in both cases: ``` $ ozone admin datanode usageinfo --ip=<hostname> $ ozone admin datanode usageinfo --hostname=<hostname> ``` We deprecated the flag and in every case that it is checked, kept the default usage, which is having value false. This way, --ip will always require the ip and if the user needs to get the info with the hostname, he can use the new --hostname parameter. Currrently, `dfs.datanode.use.datanode.hostname` is only checked in `RatisHelper.java`. Should we remove it from there as well? It is left there, because it is accessed from the external jar and not `DFSConfigKeysLegacy`. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-7329 ## How was this patch tested? Modified the existing tests and they are all passing. Tested manually in a docker cluster. -- 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]
