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

Jason Lowe commented on MAPREDUCE-5547:
---------------------------------------

Won't this create a race condition in the client where the job can be lost?  
Currently the client relies on the job state as reported by the RM to know 
where to query for job status.  If the RM reports the job as running it will 
try to query the AM, otherwise it will try the history server.  If we 
unregister _before_ copying the history data to the done_intermediate directory 
then the client could try to query the history server before the AM has had a 
chance to copy the jhist file.

The AM needs to move the file to the done_intermediate directory before 
unregistering or we create this race.  If the concern is that the unregister 
could fail and the AM could re-upload the jhist file, we could make the AM 
smarter when it goes to upload (e.g.: check for it already existing in the 
done_intermediate directory before copying).  If the history server has already 
moved it from done_intermediate to done then the history server could either 
re-update the history with the new copy in done_intermediate or simply delete 
the redundant copy in done_intermediate.

> Job history should not be flushed to JHS until AM gets unregistered
> -------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5547
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5547
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Zhijie Shen
>            Assignee: Zhijie Shen
>




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to