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

Billie Rinaldi commented on YARN-7384:
--------------------------------------

Thanks for the review, [~jianhe]! ToolRunner uses GenericOptionsParser to parse 
generic options from the command line, but it is configured to stop parsing as 
soon as it reaches an option it doesn't know about. In the case of 
ApplicationCLI, the first argument is always a custom string 
(app|application|applicationattempt|container), so GenericOptionsParser has not 
been parsing any arguments for this class. I think this is a bug. Stripping off 
the first argument allows us to pass in generic options at the beginning of the 
argument array, for example:
{noformat}
yarn app -Dyarn.service.base.path=/apps-base-dir -save appName fileName
{noformat}

I had to add the check for firstArg being null because TestYarnCLI is calling 
ApplicationCLI#run directly, without using ToolRunner or ApplicationCLI#main. 
This check preserves the old behavior of handling an argument array that has 
not been preprocessed.

> Remove apiserver cmd and merge service cmd into application cmd
> ---------------------------------------------------------------
>
>                 Key: YARN-7384
>                 URL: https://issues.apache.org/jira/browse/YARN-7384
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Billie Rinaldi
>            Assignee: Billie Rinaldi
>         Attachments: YARN-7384-yarn-native-services.001.patch, 
> YARN-7384-yarn-native-services.002.patch, 
> YARN-7384-yarn-native-services.003.patch
>
>
> As per discussion on YARN-7326.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to