[ https://issues.apache.org/jira/browse/YARN-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13784841#comment-13784841 ]
Siddharth Seth commented on YARN-1131: -------------------------------------- Thanks for the review. bq. why not use Option.setRequired for the applicationId param - this will allow removal of the appIdStr == null check. Will look into using this. bq. is a YarnApplicationState check enough to guarantee that the user receives the correct error message in case logs are tried to be retrieved when log aggregration is still in process just after the app completes? Had mentioned this in my last comment. Not targeting for this jira. bq. There's still a case, right after an app completes, but before aggregation is complete where an empty output is returned. That should be a separate jira though. bq. typo in function name "dumpAContainersLogs" or is it meant to read dump a container's logs? Maybe just dumpContainerLogs? I believe it was meant to be this. The diff, unfortunately, is a lot bigger than it should be, since the files had to be moved between packages. bq. containerIdStr and nodeAddressStr could be parsed for correct format to error out earlier before invoking the actual log reader functionality. bq. missing test for when container id specified but node address is not ( and vice versa ) ? Only targeting the specific issue mentioned in the jira. I'm sure there's more - but applicationId is likely to be the most common case. The rest can be a single or multiple separate jiras. > $ yarn logs should return a message log aggregation is during progress if > YARN application is running > ----------------------------------------------------------------------------------------------------- > > Key: YARN-1131 > URL: https://issues.apache.org/jira/browse/YARN-1131 > Project: Hadoop YARN > Issue Type: Sub-task > Components: client > Affects Versions: 2.1.1-beta > Reporter: Tassapol Athiapinya > Assignee: Siddharth Seth > Priority: Minor > Attachments: YARN-1131.1.txt > > > In the case when log aggregation is enabled, if a user submits MapReduce job > and runs $ yarn logs -applicationId <app ID> while the YARN application is > running, the command will return no message and return user back to shell. It > is nice to tell the user that log aggregation is in progress. > {code} > -bash-4.1$ /usr/bin/yarn logs -applicationId application_1377900193583_0002 > -bash-4.1$ > {code} > At the same time, if invalid application ID is given, YARN CLI should say > that the application ID is incorrect rather than throwing > NoSuchElementException. > {code} > $ /usr/bin/yarn logs -applicationId application_00000 > Exception in thread "main" java.util.NoSuchElementException > at com.google.common.base.AbstractIterator.next(AbstractIterator.java:75) > at > org.apache.hadoop.yarn.util.ConverterUtils.toApplicationId(ConverterUtils.java:124) > at > org.apache.hadoop.yarn.util.ConverterUtils.toApplicationId(ConverterUtils.java:119) > at org.apache.hadoop.yarn.logaggregation.LogDumper.run(LogDumper.java:110) > at org.apache.hadoop.yarn.logaggregation.LogDumper.main(LogDumper.java:255) > {code} -- This message was sent by Atlassian JIRA (v6.1#6144)