You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Jason Lowe (JIRA)" <ji...@apache.org> on 2017/06/15 14:22:00 UTC

[jira] [Commented] (HADOOP-14522) Unable to see logs for Job end notification

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

Jason Lowe commented on HADOOP-14522:
-------------------------------------

The JobHistoryEventHandler is responsible for generating events for job history (i.e.: data needed by the job history server).  It is not control syslog.  The reason the logs aren't seen is because the MRAppMaster stop method does this:
{code}
  protected void shutdownTaskLog() {
    TaskLog.syncLogsShutdown(logSyncer);
  }

  @Override
  public void stop() {
    super.stop();
    shutdownTaskLog();
  }
{code}

and TaskLog.syncLogsShutdown calls LogManager.shutdown.  That stops all log4j log appenders, so any subsequent attempts to log will be ignored.

> Unable to see logs for Job end notification
> -------------------------------------------
>
>                 Key: HADOOP-14522
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14522
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>            Reporter: Satish Subhashrao Saley
>              Labels: applicationmaster, mapreduce
>
> Hi, I have set {{mapreduce.job.end-notification.url}} and I am able to get the notification correctly.  But I am unable to see log lines from class org.apache.hadoop.mapreduce.v2.app.MRAppMaster regarding job end notification. When I was trying out different notification urls (before stabilizing my app), I didn't have any way to look at the logs and wasted a lot of time figuring out actual issue. It would be good if these logs are also included in syslog for container. 
> [relevant code|https://github.com/apache/hadoop/blob/branch-2.8/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java#L641-L650]
> {code}
> notifyIsLastAMRetry(isLastAMRetry);
>       // Stop all services
>       // This will also send the final report to the ResourceManager
>       LOG.info("Calling stop for all the services"); <---- Able to see this.
>       MRAppMaster.this.stop();
>       if (isLastAMRetry) {
>         // Send job-end notification when it is safe to report termination to
>         // users and it is the last AM retry
>         if (getConfig().get(MRJobConfig.MR_JOB_END_NOTIFICATION_URL) != null) {
>           try {
>             LOG.info("Job end notification started for jobID : "
>                 + job.getReport().getJobId()); <--- unable to see this
>             JobEndNotifier notifier = new JobEndNotifier();
>             notifier.setConf(getConfig());
>             JobReport report = job.getReport();
> {code}
> Is it because we are shutting down all services including JobHistoryEventHandler in {{MRAppMaster.this.stop();}} ? 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org