hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devaraj K (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-2795) [MR-279] AppsKilled is never incremented
Date Mon, 10 Oct 2011 10:00:30 GMT

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

Devaraj K commented on MAPREDUCE-2795:
--------------------------------------

Hi Vinod, 

    Thanks for the explanation.	

{code:title=YARNRunner.java|borderStyle=solid}
   public void killJob(JobID arg0) throws IOException, InterruptedException {
    /* check if the status is not running, if not send kill to RM */
    JobStatus status = clientCache.getClient(arg0).getJobStatus(arg0);
    if (status.getState() != JobStatus.State.RUNNING) {
      resMgrDelegate.killApplication(TypeConverter.toYarn(arg0).getAppId());
      return;
    }

    try {
      /* send a kill to the AM */
      clientCache.getClient(arg0).killJob(arg0);
      long currentTimeMillis = System.currentTimeMillis();
      long timeKillIssued = currentTimeMillis;
      while ((currentTimeMillis < timeKillIssued + 10000L) && (status.getState()
          != JobStatus.State.KILLED)) {
          try {
            Thread.sleep(1000L);
          } catch(InterruptedException ie) {
            /** interrupted, just break */
            break;
          }
          currentTimeMillis = System.currentTimeMillis();
          status = clientCache.getClient(arg0).getJobStatus(arg0);
      }
    } catch(IOException io) {
      LOG.debug("Error when checking for application status", io);
    }
    if (status.getState() != JobStatus.State.KILLED) {
      resMgrDelegate.killApplication(TypeConverter.toYarn(arg0).getAppId());
    }
  }
  {code}



If I refer to YARNRunner.killJob(JobID) method, then I see that the killing of the job is
handled in two different ways.
1. If JobStatus.State. is not RUNNING then ResourceMgrDelegate.killApplication(ApplicationId)

2. Otherwise ClientServiceDelegate.killJob(JobID)

Is it good idea to kill the application itself, if it not in running state? In this case it
is incrementing the apps killed metrics even if the user trying to kill the job.
                
> [MR-279] AppsKilled is never incremented
> ----------------------------------------
>
>                 Key: MAPREDUCE-2795
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2795
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: mrv2
>    Affects Versions: 0.23.0
>            Reporter: Ramya Sunil
>            Assignee: Devaraj K
>            Priority: Blocker
>             Fix For: 0.23.0, 0.24.0
>
>         Attachments: MAPREDUCE-2795.patch
>
>
> AppsKilled metrics is never incremented even though there are killed jobs in the system.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message