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

Alejandro Abdelnur commented on HADOOP-1558:
--------------------------------------------

A comment related 1416.

1558 issue/patch is to address the handling of the output directory from 
working to final location.

1416 issue is to address the handling of the output of a part from working to 
final location with speculative execution considerations.

The OutputHandler (of 1558) provides to the task the base path where to create 
the part file. 

To solve 1416 a similar pattern (of 1558) could be used.

A way of doing it could be by adding to the OutputHandler interface the 
following methods:

  Path getUncommittedPartFile(JobConf conf, taskId);
  void initializePartFile(JobConf conf, taskId);
  void commitPartFile(JobConf conf, taskId);

The speculative execution logic would invoke init/commit methods and this 
methods would resolve any cleanup/discard to be done.

As this is handled in the OutputHandler implementation it will work for 
non-file base scenarios as well and transparently from the TT.


> changes to OutputFormat to work on temporary directory to enable re-running 
> crashed jobs (Issue: 1121)
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-1558
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1558
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: mapred
>         Environment: all
>            Reporter: Alejandro Abdelnur
>             Fix For: 0.15.0
>
>         Attachments: hadoop-1558-JUL2607-1600.txt
>
>
> Add  OutputFormat methods like:
> /** Called to initialize output for this job. */
> void initialize(JobConf job) throws IOException;
> /** Called to finalize output for this job. */
> void commit(JobConf job) throws IOException;
> In the base implemenation for FileSystem output, initialize() might then 
> create a temporary directory for the job, removing any that already exists, 
> and commit could rename the temporary output directory to the final name. 
> The existing checkOutputSpecs() would continue to throw an exception if the 
> final output already exists.

-- 
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