Author: cdouglas
Date: Wed Apr 1 22:01:35 2009
New Revision: 761082
URL: http://svn.apache.org/viewvc?rev=761082&view=rev
Log:
HADOOP-5607. Fix NPE in TestCapacityScheduler.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=761082&r1=761081&r2=761082&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Apr 1 22:01:35 2009
@@ -1165,6 +1165,8 @@
the running job's information printed to the user's stdout as it runs.
(omalley)
+ HADOOP-5607. Fix NPE in TestCapacityScheduler. (cdouglas)
+
Release 0.19.2 - Unreleased
BUG FIXES
Modified:
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java?rev=761082&r1=761081&r2=761082&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
(original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
Wed Apr 1 22:01:35 2009
@@ -95,7 +95,7 @@
private volatile boolean jobFailed = false;
JobPriority priority = JobPriority.NORMAL;
- JobTracker jobtracker = null;
+ final JobTracker jobtracker;
// NetworkTopology Node to the set of TIPs
Map<Node, List<TaskInProgress>> nonRunningMapCache;
@@ -213,6 +213,7 @@
this.numReduceTasks = conf.getNumReduceTasks();
this.maxLevel = NetworkTopology.DEFAULT_HOST_LEVEL;
this.anyCacheLevel = this.maxLevel+1;
+ this.jobtracker = null;
}
/**
@@ -2114,7 +2115,6 @@
}
private synchronized void terminateJob(int jobTerminationState) {
- final JobTrackerInstrumentation metrics = jobtracker.getInstrumentation();
if ((status.getRunState() == JobStatus.RUNNING) ||
(status.getRunState() == JobStatus.PREP)) {
if (jobTerminationState == JobStatus.FAILED) {
@@ -2135,7 +2135,8 @@
this.finishedReduceTasks);
}
garbageCollect();
- metrics.terminateJob(this.conf, this.status.getJobID());
+ jobtracker.getInstrumentation().terminateJob(
+ this.conf, this.status.getJobID());
}
}