[ 
https://issues.apache.org/jira/browse/YARN-3164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14319581#comment-14319581
 ] 

Bibin A Chundatt commented on YARN-3164:
----------------------------------------

[~xgong] I did look at the method but same way was not able to do. please do 
correct me if i am wrong

In HAAdmin the errOut is Initialized as below and used in function

{code}
public abstract class HAAdmin extends Configured implements Tool {
 /** Output stream for errors, for use in tests */
  protected PrintStream errOut = System.err;
  protected PrintStream out = System.out;
}
private void printUsage(PrintStream errOut, String cmd) {
        ..      
    errOut.println("Usage: HAAdmin [" + cmd + " " + usage.args + "]");
  }
{code}

Error out gets initialized in Setup of TestRMAdminCli. So when tried to set 
Sys.err in test method didnt work out.
For {code}class DFSHAAdmin extends HAAdmin {code} also the same way its handled 
.DFSHAAdmin  have added method {color:red}setErrOut{color} for that too.

Another option is to set System.err in {color:red}Before{color} of  
TestRMAdminCli before initializing *rmAdminCLIWithHAEnabled* variable. So 
hoping that current implementation is fine what do you say? 


> rmadmin command usage prints incorrect command name
> ---------------------------------------------------
>
>                 Key: YARN-3164
>                 URL: https://issues.apache.org/jira/browse/YARN-3164
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>    Affects Versions: 2.6.0
>            Reporter: Bibin A Chundatt
>            Assignee: Bibin A Chundatt
>            Priority: Minor
>         Attachments: YARN-3164.1.patch, YARN-3164.2.patch
>
>
> /hadoop/bin>{color:red} ./yarn rmadmin -transitionToActive {color}
> transitionToActive: incorrect number of arguments
> Usage:{color:red}  HAAdmin  {color} [-transitionToActive <serviceId> 
> [--forceactive]]
> >{color:red} ./yarn HAAdmin {color} 
> Error: Could not find or load main class HAAdmin
> Expected it should be rmadmin



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to