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

Devaraj Das commented on HADOOP-5394:
-------------------------------------

Some comments:
1) The file jobtracker.info (the restart count file) must always exist in the 
system directory, and the value in the file should be 0 (indicating the JT has 
started fresh). RecoveryManager.getRestartCount should be changed accordingly. 
The update to the info file should be like:
{code}
   if (infoFile.exists()) {
       delete (infoFile.recovery);
   } else {
       rename (infoFile.recovery, infoFile);
   }
   count = readInfoFile();
   write (count + 1) to infoFile.recover;
   delete infoFile;
   rename (infoFile.recover infoFile);
{code}

2) Add checks for info file in the testcase.
3) The restart count need not be logged in the JobHistory file.

> JobTracker might schedule 2 attempts of the same task with the same attempt 
> id across restarts
> ----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-5394
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5394
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Amar Kamat
>            Assignee: Amar Kamat
>            Priority: Critical
>         Attachments: HADOOP-5394-v1.2.patch
>
>
> This can happen when the jobtracker gets restarted more than once. In such 
> cases, the jobtracker depends on the jobhistory file for the next restart 
> count. If the new restart-count is not flushed to the file then there is a 
> fair chance that upon next restart, the jobtracker might schedule a new 
> attempt with an existing id. This can cause problems not only with the 
> side-effect files but also can cause the jobtracker to be in an inconsistent 
> state.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to