You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Uma Maheswara Rao G (Jira)" <ji...@apache.org> on 2020/10/08 01:37:00 UTC
[jira] [Created] (HDDS-4325) Incompatible return codes from Ozone
getconf -confKey
Uma Maheswara Rao G created HDDS-4325:
-----------------------------------------
Summary: 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
Reporter: Uma Maheswara Rao G
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org