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 16:46:00 UTC
[jira] [Commented] (HDDS-4325) Incompatible return codes from Ozone
getconf -confKey
[ https://issues.apache.org/jira/browse/HDDS-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17210326#comment-17210326 ]
Uma Maheswara Rao G commented on HDDS-4325:
-------------------------------------------
Changing the reporter to [~nmaheshwari] thank you!
> 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: Namit Maheshwari
> 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.
> Thanks [~nmaheshwari] for helping on debug and finding the issue.
>
--
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