[
https://issues.apache.org/jira/browse/HDDS-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai updated HDDS-4325:
-----------------------------------
Status: Patch Available (was: In Progress)
> Incompatible return codes from Ozone getconf -confKey
> -----------------------------------------------------
>
> Key: HDDS-4325
> URL: https://issues.apache.org/jira/browse/HDDS-4325
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone CLI
> Affects Versions: 1.0.0
> Reporter: Uma Maheswara Rao G
> Assignee: Attila Doroszlai
> Priority: Major
> Labels: pull-request-available
>
> It seems that the return codes of ozone getconf -confKey are different in
> prior 1.0 and after 1.0.
> Looking at the code:
> in old code:
> /** Method to be overridden by sub classes for specific behavior. */
> int doWorkInternal(OzoneGetConf tool, String[] args) throws Exception {
> {code:java}
> String value = tool.getConf().getTrimmed(key);
> if (value != null) {
> tool.printOut(value);
> return 0;
> }
> tool.printError("Configuration " + key + " is missing.");
> return -1;
> }
> {code}
> with 1.0 code:
> @Override
> public Void call() throws Exception {
> String value = tool.getConf().getTrimmed(confKey);
> if (value != null) {
> tool.printOut(value);
> } else {
> tool.printError("Configuration " + confKey + " is missing.");
> }
> return null;
> }
> We are returning null irrespective of the cases.
> Some applications/tests depending on this codes.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]