hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r406750 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/TaskInProgress.java
Date Mon, 15 May 2006 21:46:49 GMT
Author: cutting
Date: Mon May 15 14:46:49 2006
New Revision: 406750

URL: http://svn.apache.org/viewcvs?rev=406750&view=rev
Log:
HADOOP-218.  Avoid accessing configuration while looping through tasks in JobTracker.  Contributed
by Mahadev.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskInProgress.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/CHANGES.txt?rev=406750&r1=406749&r2=406750&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon May 15 14:46:49 2006
@@ -35,6 +35,9 @@
     may also be specified when files are opened.
     (omalley via cutting)
 
+ 9. HADOOP-218. Avoid accessing configuration while looping through
+    tasks in JobTracker.  (Mahadev Konar via cutting)
+
 
 Release 0.2.1 - 2006-05-12
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskInProgress.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskInProgress.java?rev=406750&r1=406749&r2=406750&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskInProgress.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskInProgress.java Mon May 15 14:46:49
2006
@@ -69,7 +69,7 @@
     private TreeSet usableTaskIds = new TreeSet();
     private TreeSet recentTasks = new TreeSet();
     private JobConf conf;
-    
+    private boolean runSpeculative;
     private TreeMap taskDiagnosticData = new TreeMap();
     private TreeMap taskStatuses = new TreeMap();
 
@@ -129,6 +129,7 @@
      */
     void init(String jobUniqueString) {
         this.startTime = System.currentTimeMillis();
+        this.runSpeculative = conf.getSpeculativeExecution();
         String uniqueString = makeUniqueString(jobUniqueString);
         this.id = "tip_" + uniqueString;
         this.totalTaskIds = new String[MAX_TASK_EXECS + MAX_TASK_FAILURES];
@@ -417,7 +418,7 @@
         //
         if (isMapTask() &&
             recentTasks.size() <= MAX_TASK_EXECS &&
-            conf.getSpeculativeExecution() &&
+            runSpeculative &&
             (averageProgress - progress >= SPECULATIVE_GAP) &&
             (System.currentTimeMillis() - startTime >= SPECULATIVE_LAG)) {
             return true;



Mime
View raw message