hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-5723) MR AM container log empty if exception occurs
Date Wed, 22 Jan 2014 14:36:22 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-5723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13878693#comment-13878693

Jason Lowe commented on MAPREDUCE-5723:

Agree with Karthik that a test case would be nice because unit tests are useful for regression
tests and not just for new functionality.  However this will be a bit tricky to test via spy
since LogManager.shutdown is a static function, and MRAppMaster is not invoking it via an
object that can be modified for testing.  For this patch I'm OK if it doesn't have a test
since it's relatively small and straightforward, but in general we want unit tests even if
it's just a bugfix.

As for the patch itself, we need to call LogManager.shutdown() after super.stop(), otherwise
we end up shutting down the logging system before shutting down all the services registered
within the MRAppMaster service.  We want to see the logs of those sub-services shutting down.

> MR AM container log empty if exception occurs
> ---------------------------------------------
>                 Key: MAPREDUCE-5723
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5723
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: applicationmaster
>    Affects Versions: 2.2.0
>            Reporter: Mohammad Kamrul Islam
>            Assignee: Mohammad Kamrul Islam
>             Fix For: trunk, 2.2.0
>         Attachments: MAPREDUCE-5723.1.patch, MAPREDUCE-5723.2.patch, MAPREDUCE-5723.3.patch
> It occurs when the property "mapreduce.task.userlog.limit.kb" is set non-zero in mapped-site.xml.
> AM container syslog remains empty if any exception occurs. 
> Bug details:
> In MRAppMaster.java, the following code snippets show the bug.
> {code}
>     } catch (Throwable t) {
>        LOG.fatal("Error starting MRAppMaster", t);
>       System.exit(1);
>     }finally {
>        LogManager.shutdown();
>     }
> {code}
> In the catch block, we are exiting the JVM. So finally block (therefore LogManager.shutdown())
is never executed.
> Possible fix: 
> Make sure LogManager.shutdown() is executed in all cases.

This message was sent by Atlassian JIRA

View raw message