Browse Source

Merge -r 669784:669785 from trunk onto 0.18 branch. Fixes HADOOP-3590.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.18@669786 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 17 years ago
parent
commit
de0eb10ff1
2 changed files with 6 additions and 2 deletions
  1. 3 0
      CHANGES.txt
  2. 3 2
      src/mapred/org/apache/hadoop/mapred/JobInProgress.java

+ 3 - 0
CHANGES.txt

@@ -651,6 +651,9 @@ Release 0.18.0 - Unreleased
     HADOOP-3599. Fix JobConf::setCombineOnceOnly to modify the instance rather
     HADOOP-3599. Fix JobConf::setCombineOnceOnly to modify the instance rather
     than a parameter. (Owen O'Malley via cdouglas)
     than a parameter. (Owen O'Malley via cdouglas)
 
 
+    HADOOP-3590. Null pointer exception in JobTracker when the task tracker is 
+    not yet resolved. (Amar Ramesh Kamat via ddas)
+
 Release 0.17.1 - Unreleased
 Release 0.17.1 - Unreleased
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

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

@@ -1055,6 +1055,7 @@ class JobInProgress {
     }
     }
 
 
     Node node = jobtracker.getNode(tts.getHost());
     Node node = jobtracker.getNode(tts.getHost());
+    Node nodeParentAtMaxLevel = null;
     
     
     // For scheduling a map task, we have two caches and a list (optional)
     // For scheduling a map task, we have two caches and a list (optional)
     //  I)   one for non-running task
     //  I)   one for non-running task
@@ -1111,6 +1112,8 @@ class JobInProgress {
         }
         }
         key = key.getParent();
         key = key.getParent();
       }
       }
+      // get the node parent at max level
+      nodeParentAtMaxLevel = JobTracker.getParentNode(node, maxLevel - 1);
     }
     }
 
 
     //2. Search breadth-wise across parents at max level for non-running 
     //2. Search breadth-wise across parents at max level for non-running 
@@ -1119,8 +1122,6 @@ class JobInProgress {
     //     - node information for the tracker is missing (tracker's topology
     //     - node information for the tracker is missing (tracker's topology
     //       info not obtained yet)
     //       info not obtained yet)
 
 
-    // get the node parent at max level
-    Node nodeParentAtMaxLevel = JobTracker.getParentNode(node, maxLevel - 1);
     // collection of node at max level in the cache structure
     // collection of node at max level in the cache structure
     Collection<Node> nodesAtMaxLevel = jobtracker.getNodesAtMaxLevel();
     Collection<Node> nodesAtMaxLevel = jobtracker.getNodesAtMaxLevel();