You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cu...@apache.org on 2006/03/03 01:17:29 UTC

svn commit: r382586 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java

Author: cutting
Date: Thu Mar  2 16:17:27 2006
New Revision: 382586

URL: http://svn.apache.org/viewcvs?rev=382586&view=rev
Log:
Check taskid's more carefully.  Suggested by Michael Stack.

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

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java?rev=382586&r1=382585&r2=382586&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java Thu Mar  2 16:17:27 2006
@@ -566,7 +566,11 @@
      */
     public synchronized void progress(String taskid, float progress, String state) throws IOException {
         TaskInProgress tip = (TaskInProgress) tasks.get(taskid);
-        tip.reportProgress(progress, state);
+        if (tip != null) {
+          tip.reportProgress(progress, state);
+        } else {
+          LOG.warning("Progress from unknown child task: "+taskid+". Ignored.");
+        }
     }
 
     /**
@@ -575,7 +579,11 @@
      */
     public synchronized void reportDiagnosticInfo(String taskid, String info) throws IOException {
         TaskInProgress tip = (TaskInProgress) tasks.get(taskid);
-        tip.reportDiagnosticInfo(info);
+        if (tip != null) {
+          tip.reportDiagnosticInfo(info);
+        } else {
+          LOG.warning("Error from unknown child task: "+taskid+". Ignored.");
+        }
     }
 
     /** Child checking to see if we're alive.  Normally does nothing.*/
@@ -590,7 +598,11 @@
      */
     public synchronized void done(String taskid) throws IOException {
         TaskInProgress tip = (TaskInProgress) tasks.get(taskid);
-        tip.reportDone();
+        if (tip != null) {
+          tip.reportDone();
+        } else {
+          LOG.warning("Unknown child task done: "+taskid+". Ignored.");
+        }
     }
 
     /** A child task had a local filesystem error.  Exit, so that no future