hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oz...@apache.org
Subject hadoop git commit: HADOOP-11648. Set DomainSocketWatcher thread name explicitly. Contributed by Liang Xie.
Date Thu, 05 Mar 2015 07:10:14 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ac874764d -> f805d48b1


HADOOP-11648. Set DomainSocketWatcher thread name explicitly. Contributed by Liang Xie.

(cherry picked from commit 74a4754d1c790b8740a4221f276aa571bc5dbfd5)


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

Branch: refs/heads/branch-2
Commit: f805d48b198471969f070abc49170082dd826e3b
Parents: ac87476
Author: Tsuyoshi Ozawa <ozawa@apache.org>
Authored: Thu Mar 5 16:05:44 2015 +0900
Committer: Tsuyoshi Ozawa <ozawa@apache.org>
Committed: Thu Mar 5 16:06:37 2015 +0900

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt              | 3 +++
 .../java/org/apache/hadoop/net/unix/DomainSocketWatcher.java | 8 +++++---
 .../org/apache/hadoop/net/unix/TestDomainSocketWatcher.java  | 2 +-
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                  | 3 +++
 .../hadoop/hdfs/server/datanode/ShortCircuitRegistry.java    | 2 +-
 .../apache/hadoop/hdfs/shortcircuit/DfsClientShmManager.java | 3 ++-
 6 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f805d48b/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 f4728b2..d7b0980 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -227,6 +227,9 @@ Release 2.7.0 - UNRELEASED
     HADOOP-11658. Externalize io.compression.codecs property.
     (Kai Zheng via aajisaka)
 
+    HADOOP-11648. Set DomainSocketWatcher thread name explicitly.
+    (Liang Xie via ozawa)
+
   OPTIMIZATIONS
 
     HADOOP-11323. WritableComparator#compare keeps reference to byte array.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f805d48b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/unix/DomainSocketWatcher.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/unix/DomainSocketWatcher.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/unix/DomainSocketWatcher.java
index 8c617dc..03b52e0 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/unix/DomainSocketWatcher.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/unix/DomainSocketWatcher.java
@@ -238,7 +238,8 @@ public final class DomainSocketWatcher implements Closeable {
    */
   private boolean kicked = false;
 
-  public DomainSocketWatcher(int interruptCheckPeriodMs) throws IOException {
+  public DomainSocketWatcher(int interruptCheckPeriodMs, String src)
+      throws IOException {
     if (loadingFailureReason != null) {
       throw new UnsupportedOperationException(loadingFailureReason);
     }
@@ -246,8 +247,9 @@ public final class DomainSocketWatcher implements Closeable {
     this.interruptCheckPeriodMs = interruptCheckPeriodMs;
     notificationSockets = DomainSocket.socketpair();
     watcherThread.setDaemon(true);
-    watcherThread.setUncaughtExceptionHandler(
-        new Thread.UncaughtExceptionHandler() {
+    watcherThread.setName(src + " DomainSocketWatcher");
+    watcherThread
+        .setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
           @Override
           public void uncaughtException(Thread thread, Throwable t) {
             LOG.error(thread + " terminating on unexpected exception", t);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f805d48b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/unix/TestDomainSocketWatcher.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/unix/TestDomainSocketWatcher.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/unix/TestDomainSocketWatcher.java
index e85e414..4b0e2a8 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/unix/TestDomainSocketWatcher.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/unix/TestDomainSocketWatcher.java
@@ -195,7 +195,7 @@ public class TestDomainSocketWatcher {
   private DomainSocketWatcher newDomainSocketWatcher(int interruptCheckPeriodMs)
       throws Exception {
     DomainSocketWatcher watcher = new DomainSocketWatcher(
-        interruptCheckPeriodMs);
+        interruptCheckPeriodMs, getClass().getSimpleName());
     watcher.watcherThread.setUncaughtExceptionHandler(
         new Thread.UncaughtExceptionHandler() {
           @Override

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f805d48b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index fe1c970..4491d8a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -407,6 +407,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-7746. Add a test randomly mixing append, truncate and snapshot
     operations. (szetszwo)
 
+    HADOOP-11648. Set DomainSocketWatcher thread name explicitly.
+    (Liang Xie via ozawa)
+
   OPTIMIZATIONS
 
     HDFS-7454. Reduce memory footprint for AclEntries in NameNode.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f805d48b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ShortCircuitRegistry.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ShortCircuitRegistry.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ShortCircuitRegistry.java
index 965b40a..32906f4 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ShortCircuitRegistry.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ShortCircuitRegistry.java
@@ -176,7 +176,7 @@ public class ShortCircuitRegistry {
       if (dswLoadingFailure != null) {
         throw new IOException(dswLoadingFailure);
       }
-      watcher = new DomainSocketWatcher(interruptCheck);
+      watcher = new DomainSocketWatcher(interruptCheck, "datanode");
       enabled = true;
       if (LOG.isDebugEnabled()) {
         LOG.debug("created new ShortCircuitRegistry with interruptCheck=" +

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f805d48b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/shortcircuit/DfsClientShmManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/shortcircuit/DfsClientShmManager.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/shortcircuit/DfsClientShmManager.java
index 6dbaf84..9092bc5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/shortcircuit/DfsClientShmManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/shortcircuit/DfsClientShmManager.java
@@ -412,7 +412,8 @@ public class DfsClientShmManager implements Closeable {
   private final DomainSocketWatcher domainSocketWatcher;
   
   DfsClientShmManager(int interruptCheckPeriodMs) throws IOException {
-    this.domainSocketWatcher = new DomainSocketWatcher(interruptCheckPeriodMs);
+    this.domainSocketWatcher = new DomainSocketWatcher(interruptCheckPeriodMs,
+        "client");
   }
   
   public Slot allocSlot(DatanodeInfo datanode, DomainPeer peer,


Mime
View raw message