Sfoglia il codice sorgente

MAPREDUCE-5047. keep.failed.task.files=true causes job failure on secure clusters. (sandyr via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1455283 13f79535-47bb-0310-9956-ffa450edef68
Alejandro Abdelnur 12 anni fa
parent
commit
fb4f6194b9

+ 2 - 0
CHANGES.txt

@@ -10,6 +10,8 @@ Release 1.3.0 - unreleased
 
   BUG FIXES
 
+    MAPREDUCE-5047. keep.failed.task.files=true causes job failure on 
+    secure clusters. (sandyr via tucu)
 
 Release 1.2.0 - unreleased
 

+ 5 - 0
src/mapred/org/apache/hadoop/mapred/Child.java

@@ -335,6 +335,11 @@ class Child {
     // Do the task-type specific localization
     task.localizeConfiguration(jobConf);
     
+    // Write files required to re-run the task with IsolationRunner
+    if (task.supportIsolationRunner(jobConf)) {
+      task.writeFilesRequiredForRerun(jobConf);
+    }
+    
     //write the localized task jobconf
     LocalDirAllocator lDirAlloc = 
       new LocalDirAllocator(JobConf.MAPRED_LOCAL_DIR_PROPERTY);

+ 2 - 3
src/mapred/org/apache/hadoop/mapred/MapTask.java

@@ -109,15 +109,14 @@ class MapTask extends Task {
   }
 
   @Override
-  public void localizeConfiguration(JobConf conf)
+  public void writeFilesRequiredForRerun(JobConf conf)
       throws IOException {
-    super.localizeConfiguration(conf);
     // split.info file is used only by IsolationRunner.
     // Write the split file to the local disk if it is a normal map task (not a
     // job-setup or a job-cleanup task) and if the user wishes to run
     // IsolationRunner either by setting keep.failed.tasks.files to true or by
     // using keep.tasks.files.pattern
-    if (supportIsolationRunner(conf) && isMapOrReduce()) {
+    if (isMapOrReduce()) {
       // localize the split meta-information
       Path localSplitMeta =
         new LocalDirAllocator("mapred.local.dir").getLocalPathForWrite(

+ 7 - 0
src/mapred/org/apache/hadoop/mapred/Task.java

@@ -467,6 +467,13 @@ abstract public class Task implements Writable, Configurable {
     conf.set("mapred.job.id", taskId.getJobID().toString());
   }
   
+  /**
+   * Write files that the IsolationRunner will need to rerun the task.
+   */
+  public void writeFilesRequiredForRerun(JobConf conf) throws IOException {
+    // Do nothing in the general case
+  }
+  
   /** Run this task as a part of the named job.  This method is executed in the
    * child process and is what invokes user-supplied map, reduce, etc. methods.
    * @param umbilical for progress reports