HADOOP-12282. Connection thread's name should be updated after address changing is detected. Contributed by Lisheng Sun.
(cherry picked from commit b94eba9f11af66b10638dd255c224e946d842b8c)
This commit is contained in:
parent
21a89d544f
commit
6facb3f7c6
@ -644,6 +644,10 @@ private synchronized boolean updateAddress() throws IOException {
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user