[
https://issues.apache.org/jira/browse/YARN-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683639#comment-13683639
]
Jason Lowe commented on YARN-649:
---------------------------------
Couple of other comments:
* In ContainerLogUtils.getContainerLogFiles there's a potential for an NPE
since application can be null but we can call application.getUser() before the
null check
* Nit: All of these if statements could be boiled down to one -- or given the
other state checks just above it, maybe a switch would look cleaner?
{code}
if (EnumSet.of(ContainerState.RUNNING,
ContainerState.EXITED_WITH_FAILURE,
ContainerState.EXITED_WITH_SUCCESS).contains(
container.getContainerState())) {
return getLogFiles(containerId, applicationId, fileName, context);
}
if (EnumSet.of(ContainerState.KILLING,
ContainerState.CONTAINER_CLEANEDUP_AFTER_KILL,
ContainerState.CONTAINER_RESOURCES_CLEANINGUP).contains(
container.getContainerState())) {
//Container may have generated some logs before being killed.
return getLogFiles(containerId, applicationId, fileName, context);
}
if (container.getContainerState().equals(ContainerState.DONE)) {
// Prev state unknown. Logs may be available.
return getLogFiles(containerId, applicationId, fileName, context);
{code}
> Make container logs available over HTTP in plain text
> -----------------------------------------------------
>
> Key: YARN-649
> URL: https://issues.apache.org/jira/browse/YARN-649
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: nodemanager
> Affects Versions: 2.0.4-alpha
> Reporter: Sandy Ryza
> Assignee: Sandy Ryza
> Attachments: YARN-649.patch, YARN-752-1.patch
>
>
> It would be good to make container logs available over the REST API for
> MAPREDUCE-4362 and so that they can be accessed programatically in general.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira