hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1187119 - in /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project: ./ hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/
Date Thu, 20 Oct 2011 22:45:10 GMT
Author: acmurthy
Date: Thu Oct 20 22:45:08 2011
New Revision: 1187119

URL: http://svn.apache.org/viewvc?rev=1187119&view=rev
Log:
Merge -c 1187116 from trunk to branch-0.23 to complete fix for MAPREDUCE-3226.

Modified:
    hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/EventFetcher.java
    hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/Fetcher.java

Modified: hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt?rev=1187119&r1=1187118&r2=1187119&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt Thu Oct 20 22:45:08
2011
@@ -1656,6 +1656,8 @@ Release 0.23.0 - Unreleased
 
     MAPREDUCE-3188. Ensure correct shutdown in services. (todd via acmurthy) 
 
+    MAPREDUCE-3226. Fix shutdown of fetcher threads. (vinodkv via acmurthy) 
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/EventFetcher.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/EventFetcher.java?rev=1187119&r1=1187118&r2=1187119&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/EventFetcher.java
(original)
+++ hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/EventFetcher.java
Thu Oct 20 22:45:08 2011
@@ -60,7 +60,7 @@ class EventFetcher<K,V> extends Thread {
     LOG.info(reduce + " Thread started: " + getName());
     
     try {
-      while (true) {
+      while (true && !Thread.currentThread().isInterrupted()) {
         try {
           int numNewMaps = getMapCompletionEvents();
           failures = 0;
@@ -68,7 +68,9 @@ class EventFetcher<K,V> extends Thread {
             LOG.info(reduce + ": " + "Got " + numNewMaps + " new map-outputs");
           }
           LOG.debug("GetMapEventsThread about to sleep for " + SLEEP_TIME);
-          Thread.sleep(SLEEP_TIME);
+          if (!Thread.currentThread().isInterrupted()) {
+            Thread.sleep(SLEEP_TIME);
+          }
         } catch (IOException ie) {
           LOG.info("Exception in getting events", ie);
           // check to see whether to abort
@@ -76,7 +78,9 @@ class EventFetcher<K,V> extends Thread {
             throw new IOException("too many failures downloading events", ie);
           }
           // sleep for a bit
-          Thread.sleep(RETRY_PERIOD);
+          if (!Thread.currentThread().isInterrupted()) {
+            Thread.sleep(RETRY_PERIOD);
+          }
         }
       }
     } catch (InterruptedException e) {

Modified: hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/Fetcher.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/Fetcher.java?rev=1187119&r1=1187118&r2=1187119&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/Fetcher.java
(original)
+++ hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/Fetcher.java
Thu Oct 20 22:45:08 2011
@@ -135,7 +135,7 @@ class Fetcher<K,V> extends Thread {
   
   public void run() {
     try {
-      while (true) {
+      while (true && !Thread.currentThread().isInterrupted()) {
         MapHost host = null;
         try {
           // If merge is on, block



Mime
View raw message