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

Xuan Gong commented on YARN-5524:
---------------------------------

[~vrushalic]

Instead of doing
{code}
String unknownOptions = StringUtils.join(commandLine.getArgs(), ' ');
if (StringUtils.isNotBlank(unknownOptions)) {
  System.err.println("Invalid option(s) specified " + unknownOptions);
  return -1;
}
{code}

we could change 
{code}
CommandLine commandLine = parser.parse(opts, args, true);
to
CommandLine commandLine = parser.parse(opts, args, false);
{code}
So, the GnuParser would detect invalid option by itself.

> Yarn live log aggregation does not throw if command line arg is wrong
> ---------------------------------------------------------------------
>
>                 Key: YARN-5524
>                 URL: https://issues.apache.org/jira/browse/YARN-5524
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: log-aggregation
>    Affects Versions: 2.9.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Vrushali C
>         Attachments: YARN-5524.001.patch, YARN-5524.002.patch
>
>
> When we used wrong command line arg for specify log file pattern, yarn did 
> not throw any exception instead it pulled entire log onto the client.
> {code}
> [hive@ctr-e20-1468887904486-0007-01-000003 ~]$ yarn logs -applicationId 
> application_1470931023753_0001 -logFiles hive.*2016-08-11-21.* > logs
> {code}
> NOTE: we are using -logFiles instead of -log_files
> This query should have failed.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to