hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r754850 - in /hadoop/core/branches/branch-0.20: ./ CHANGES.txt src/mapred/org/apache/hadoop/mapred/EagerTaskInitializationListener.java
Date Mon, 16 Mar 2009 08:50:20 GMT
Author: ddas
Date: Mon Mar 16 08:50:19 2009
New Revision: 754850

URL: http://svn.apache.org/viewvc?rev=754850&view=rev
Log:
Merge -r 754846:754847 from trunk onto 0.20 branch. Fixes HADOOP-5490.

Modified:
    hadoop/core/branches/branch-0.20/   (props changed)
    hadoop/core/branches/branch-0.20/CHANGES.txt   (contents, props changed)
    hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/EagerTaskInitializationListener.java

Propchange: hadoop/core/branches/branch-0.20/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Mar 16 08:50:19 2009
@@ -1,2 +1,2 @@
 /hadoop/core/branches/branch-0.19:713112
-/hadoop/core/trunk:727001,727117,727191,727212,727217,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,736426,738328,738697,740077,740157,741703,741762,743745,743816,743892,744894,745180,746010,746206,746227,746233,746274,746338,746902-746903,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752609,752834,752836,752913,752932,753112-753113,753346,754645
+/hadoop/core/trunk:727001,727117,727191,727212,727217,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,736426,738328,738697,740077,740157,741703,741762,743745,743816,743892,744894,745180,746010,746206,746227,746233,746274,746338,746902-746903,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752609,752834,752836,752913,752932,753112-753113,753346,754645,754847

Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=754850&r1=754849&r2=754850&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Mon Mar 16 08:50:19 2009
@@ -722,6 +722,9 @@
     HADOOP-5278. Fixes a problem to do with logging the finish time of a task 
     during recovery (after a JobTracker restart). (Amar Kamat via ddas)
 
+    HADOOP-5490. Fixes a synchronization problem in the EagerTaskInitializationListener
+    class. (Jothi Padmanabhan via ddas)
+
 Release 0.19.2 - Unreleased
 
   BUG FIXES

Propchange: hadoop/core/branches/branch-0.20/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Mar 16 08:50:19 2009
@@ -1,3 +1,3 @@
 /hadoop/core/branches/branch-0.18/CHANGES.txt:727226
 /hadoop/core/branches/branch-0.19/CHANGES.txt:713112
-/hadoop/core/trunk/CHANGES.txt:727001,727117,727191,727212,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,735082,736426,738602,738697,739416,740077,740157,741703,741762,743296,743745,743816,743892,744894,745180,745268,746010,746193,746206,746227,746233,746274,746902-746903,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752514,752555,752590,752609,752834,752836,752913,752932,753112-753113,753346,754645
+/hadoop/core/trunk/CHANGES.txt:727001,727117,727191,727212,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,735082,736426,738602,738697,739416,740077,740157,741703,741762,743296,743745,743816,743892,744894,745180,745268,746010,746193,746206,746227,746233,746274,746902-746903,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752514,752555,752590,752609,752834,752836,752913,752932,753112-753113,753346,754645,754847

Modified: hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/EagerTaskInitializationListener.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/EagerTaskInitializationListener.java?rev=754850&r1=754849&r2=754850&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/EagerTaskInitializationListener.java
(original)
+++ hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/EagerTaskInitializationListener.java
Mon Mar 16 08:50:19 2009
@@ -51,14 +51,11 @@
       while (true) {
         try {
           synchronized (jobInitQueue) {
-            while (jobInitQueue.isEmpty() && !exitFlag) {
+            while (jobInitQueue.isEmpty()) {
               jobInitQueue.wait();
             }
-            if (exitFlag) {
-              break;
-            }
+            job = jobInitQueue.remove(0);
           }
-          job = jobInitQueue.remove(0);
           threadPool.execute(new InitJob(job));
         } catch (InterruptedException t) {
           LOG.info("JobInitManagerThread interrupted.");
@@ -97,7 +94,6 @@
   private List<JobInProgress> jobInitQueue = new ArrayList<JobInProgress>();
   private ExecutorService threadPool;
   private int numThreads;
-  private boolean exitFlag = false;
   
   public EagerTaskInitializationListener(Configuration conf) {
     numThreads = conf.getInt("mapred.jobinit.threads", DEFAULT_NUM_THREADS);
@@ -113,10 +109,7 @@
   public void terminate() throws IOException {
     if (jobInitManagerThread != null && jobInitManagerThread.isAlive()) {
       LOG.info("Stopping Job Init Manager thread");
-      synchronized (jobInitQueue) {
-        exitFlag = true;
-        jobInitQueue.notify();
-      }
+      jobInitManagerThread.interrupt();
       try {
         jobInitManagerThread.join();
       } catch (InterruptedException ex) {



Mime
View raw message