hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r383626 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
Date Mon, 06 Mar 2006 19:09:46 GMT
Author: cutting
Date: Mon Mar  6 11:09:44 2006
New Revision: 383626

URL: http://svn.apache.org/viewcvs?rev=383626&view=rev
Log:
Replace an NPE with an informative warning.

Modified:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=383626&r1=383625&r2=383626&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java Mon Mar  6 11:09:44
2006
@@ -551,6 +551,11 @@
         // Get map + reduce counts for the current tracker.
         //
         TaskTrackerStatus tts = (TaskTrackerStatus) taskTrackers.get(taskTracker);
+        if (tts == null) {
+          LOG.warning("Unknown task tracker polling; ignoring: " + taskTracker);
+          return null;
+        }
+
         int numMaps = tts.countMapTasks();
         int numReduces = tts.countReduceTasks();
 



Mime
View raw message