Browse Source

HADOOP-5264. Removes redundant configuration object from the TaskTracker. Contributed by Sharad Agarwal.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@747675 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 16 years ago
parent
commit
a012e9180f
2 changed files with 4 additions and 3 deletions
  1. 3 0
      CHANGES.txt
  2. 1 3
      src/mapred/org/apache/hadoop/mapred/TaskTracker.java

+ 3 - 0
CHANGES.txt

@@ -134,6 +134,9 @@ Trunk (unreleased changes)
     HADOOP-5042. Add a cleanup stage to log rollover in Chukwa appender.
     HADOOP-5042. Add a cleanup stage to log rollover in Chukwa appender.
     (Jerome Boulon via cdouglas)
     (Jerome Boulon via cdouglas)
 
 
+    HADOOP-5264. Removes redundant configuration object from the TaskTracker.
+    (Sharad Agarwal via ddas)
+
   OPTIMIZATIONS
   OPTIMIZATIONS
 
 
   BUG FIXES
   BUG FIXES

+ 1 - 3
src/mapred/org/apache/hadoop/mapred/TaskTracker.java

@@ -185,7 +185,6 @@ public class TaskTracker
   private static final String JOBCACHE = "jobcache";
   private static final String JOBCACHE = "jobcache";
   private static final String PID = "pid";
   private static final String PID = "pid";
   private static final String OUTPUT = "output";
   private static final String OUTPUT = "output";
-  private JobConf originalConf;
   private JobConf fConf;
   private JobConf fConf;
   private int maxCurrentMapTasks;
   private int maxCurrentMapTasks;
   private int maxCurrentReduceTasks;
   private int maxCurrentReduceTasks;
@@ -488,7 +487,6 @@ public class TaskTracker
    */
    */
   synchronized void initialize() throws IOException {
   synchronized void initialize() throws IOException {
     // use configured nameserver & interface to get local hostname
     // use configured nameserver & interface to get local hostname
-    this.fConf = new JobConf(originalConf);
     if (fConf.get("slave.host.name") != null) {
     if (fConf.get("slave.host.name") != null) {
       this.localHostname = fConf.get("slave.host.name");
       this.localHostname = fConf.get("slave.host.name");
     }
     }
@@ -961,7 +959,7 @@ public class TaskTracker
    * Start with the local machine name, and the default JobTracker
    * Start with the local machine name, and the default JobTracker
    */
    */
   public TaskTracker(JobConf conf) throws IOException {
   public TaskTracker(JobConf conf) throws IOException {
-    originalConf = conf;
+    fConf = conf;
     maxCurrentMapTasks = conf.getInt(
     maxCurrentMapTasks = conf.getInt(
                   "mapred.tasktracker.map.tasks.maximum", 2);
                   "mapred.tasktracker.map.tasks.maximum", 2);
     maxCurrentReduceTasks = conf.getInt(
     maxCurrentReduceTasks = conf.getInt(