You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2019/08/01 22:51:14 UTC

[hadoop] branch trunk updated: HADOOP-12282. Connection thread's name should be updated after address changing is detected. Contributed by Lisheng Sun.

This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b94eba9  HADOOP-12282. Connection thread's name should be updated after address changing is detected. Contributed by Lisheng Sun.
b94eba9 is described below

commit b94eba9f11af66b10638dd255c224e946d842b8c
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Thu Aug 1 15:50:43 2019 -0700

    HADOOP-12282. Connection thread's name should be updated after address changing is detected. Contributed by Lisheng Sun.
---
 .../hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
index 3afa6d8..358c0d7 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java
@@ -638,6 +638,10 @@ public class Client implements AutoCloseable {
         LOG.warn("Address change detected. Old: " + server.toString() +
                                  " New: " + currentAddr.toString());
         server = currentAddr;
+        UserGroupInformation ticket = remoteId.getTicket();
+        this.setName("IPC Client (" + socketFactory.hashCode()
+            + ") connection to " + server.toString() + " from "
+            + ((ticket == null) ? "an unknown user" : ticket.getUserName()));
         return true;
       }
       return false;


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org