hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject hadoop git commit: HADOOP-12829. StatisticsDataReferenceCleaner swallows interrupt exceptions (Gregory Chanan via cmccabe)
Date Tue, 23 Feb 2016 19:30:45 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 e3ce0ffdc -> 7dfcf4035


HADOOP-12829. StatisticsDataReferenceCleaner swallows interrupt exceptions (Gregory Chanan
via cmccabe)

(cherry picked from commit d9c409a4286e36387fb39e7d622e850c13315465)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7dfcf403
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7dfcf403
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7dfcf403

Branch: refs/heads/branch-2
Commit: 7dfcf403525af77763bede12a6c3db91a59252ce
Parents: e3ce0ff
Author: Colin Patrick Mccabe <cmccabe@cloudera.com>
Authored: Tue Feb 23 11:11:22 2016 -0800
Committer: Colin Patrick Mccabe <cmccabe@cloudera.com>
Committed: Tue Feb 23 11:27:55 2016 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt             | 3 +++
 .../src/main/java/org/apache/hadoop/fs/FileSystem.java      | 9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7dfcf403/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index b66ec3c..1fcfd60 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -66,6 +66,9 @@ Release 2.9.0 - UNRELEASED
 
    HADOOP-12712. Fix some cmake plugin and native build warnings (cmccabe)
 
+   HADOOP-12829. StatisticsDataReferenceCleaner swallows interrupt exceptions
+   (Gregory Chanan via cmccabe)
+
 Release 2.8.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7dfcf403/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
index a97c941..e18ea13 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
@@ -3170,15 +3170,16 @@ public abstract class FileSystem extends Configured implements Closeable
{
     private static class StatisticsDataReferenceCleaner implements Runnable {
       @Override
       public void run() {
-        while (true) {
+        while (!Thread.interrupted()) {
           try {
             StatisticsDataReference ref =
                 (StatisticsDataReference)STATS_DATA_REF_QUEUE.remove();
             ref.cleanUp();
+          } catch (InterruptedException ie) {
+            LOG.warn("Cleaner thread interrupted, will stop", ie);
+            Thread.currentThread().interrupt();
           } catch (Throwable th) {
-            // the cleaner thread should continue to run even if there are
-            // exceptions, including InterruptedException
-            LOG.warn("exception in the cleaner thread but it will continue to "
+            LOG.warn("Exception in the cleaner thread but it will continue to "
                 + "run", th);
           }
         }


Mime
View raw message