hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r946934 - in /hadoop/mapreduce/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/MapTaskRunner.java src/java/org/apache/hadoop/mapred/ReduceTaskRunner.java src/java/org/apache/hadoop/mapred/TaskRunner.java
Date Fri, 21 May 2010 08:45:43 GMT
Author: cdouglas
Date: Fri May 21 08:45:43 2010
New Revision: 946934

URL: http://svn.apache.org/viewvc?rev=946934&view=rev
Log:
MAPREDUCE-1662. Remove unused methods from TaskRunner. Contributed by Amareshwari Sriramadasu

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/MapTaskRunner.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/ReduceTaskRunner.java
    hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/TaskRunner.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=946934&r1=946933&r2=946934&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Fri May 21 08:45:43 2010
@@ -41,6 +41,9 @@ Trunk (unreleased changes)
     JobTracker and use that in the RefreshUserToGroupsMapping protocol and
     RefreshAuthorizationPolicyProtocol. (Boris Shkolnik via ddas)
 
+    MAPREDUCE-1662. Remove unused methods from TaskRunner. (Amareshwari
+    Sriramadasu via cdouglas)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/MapTaskRunner.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/MapTaskRunner.java?rev=946934&r1=946933&r2=946934&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/MapTaskRunner.java (original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/MapTaskRunner.java Fri May 21
08:45:43 2010
@@ -17,8 +17,6 @@
  */
 package org.apache.hadoop.mapred;
 
-import java.io.*;
-
 import org.apache.hadoop.mapred.TaskTracker.TaskInProgress;
 import org.apache.log4j.Level;
 
@@ -29,22 +27,6 @@ class MapTaskRunner extends TaskRunner {
     super(task, tracker, conf);
   }
   
-  /** Delete any temporary files from previous failed attempts. */
-  public boolean prepare() throws IOException {
-    if (!super.prepare()) {
-      return false;
-    }
-    
-    mapOutputFile.removeAll();
-    return true;
-  }
-
-  /** Delete all of the temporary map output files. */
-  public void close() throws IOException {
-    LOG.info(getTask()+" done; removing files.");
-    mapOutputFile.removeAll();
-  }
-
   @Override
   public String getChildJavaOpts(JobConf jobConf, String defaultValue) {
     return jobConf.get(JobConf.MAPRED_MAP_TASK_JAVA_OPTS, 

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/ReduceTaskRunner.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/ReduceTaskRunner.java?rev=946934&r1=946933&r2=946934&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/ReduceTaskRunner.java (original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/ReduceTaskRunner.java Fri May
21 08:45:43 2010
@@ -31,23 +31,8 @@ class ReduceTaskRunner extends TaskRunne
     super(task, tracker, conf);
   }
 
-  /** Assemble all of the map output files */
-  public boolean prepare() throws IOException {
-    if (!super.prepare()) {
-      return false;
-    }
-    
-    // cleanup from failures
-    mapOutputFile.removeAll();
-    return true;
-  }
-  
-  
-  /** Delete all of the temporary map output files. */
   public void close() throws IOException {
-    LOG.info(getTask()+" done; removing files.");
     getTask().getProgress().setStatus("closed");
-    mapOutputFile.removeAll();
   }
 
   @Override

Modified: hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/TaskRunner.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/TaskRunner.java?rev=946934&r1=946933&r2=946934&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/TaskRunner.java (original)
+++ hadoop/mapreduce/trunk/src/java/org/apache/hadoop/mapred/TaskRunner.java Fri May 21 08:45:43
2010
@@ -77,11 +77,6 @@ abstract class TaskRunner extends Thread
   protected JobConf conf;
   JvmManager jvmManager;
 
-  /** 
-   * for cleaning up old map outputs
-   */
-  protected MapOutputFile mapOutputFile;
-
   static String jobACLsFile = "job-acl.xml";
 
   public TaskRunner(TaskTracker.TaskInProgress tip, TaskTracker tracker, 
@@ -90,8 +85,6 @@ abstract class TaskRunner extends Thread
     this.t = tip.getTask();
     this.tracker = tracker;
     this.conf = conf;
-    this.mapOutputFile = new MapOutputFile();
-    this.mapOutputFile.setConf(conf);
     this.jvmManager = tracker.getJvmManagerInstance();
   }
 
@@ -101,13 +94,6 @@ abstract class TaskRunner extends Thread
 
   public JvmManager getJvmManager() { return jvmManager; }
 
-  /** Called to assemble this task's input.  This method is run in the parent
-   * process before the child is spawned.  It should not execute user code,
-   * only system code. */
-  public boolean prepare() throws IOException {
-    return true;
-  }
-
   /** Called when this task's output is no longer needed.
    * This method is run in the parent process after the child exits.  It should
    * not execute user code, only system code.
@@ -194,10 +180,6 @@ abstract class TaskRunner extends Thread
       // the conf object after this will NOT be reflected to the child.
       setupChildTaskConfiguration(lDirAlloc);
 
-      if (!prepare()) {
-        return;
-      }
-
       // Build classpath
       List<String> classPaths =
           getClassPaths(conf, workDir, taskDistributedCacheManager);



Mime
View raw message