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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to