[ 
https://issues.apache.org/jira/browse/HDDS-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uma Maheswara Rao G updated HDDS-4325:
--------------------------------------
    Description: 
It seems that the return codes of ozone getconf -confKey are different in 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.
 

  was:
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.
 


> 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.1.0
>            Reporter: Namit Maheshwari
>            Assignee: Attila Doroszlai
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.1.0
>
>
> It seems that the return codes of ozone getconf -confKey are different in 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to