HADOOP-12282. Connection thread's name should be updated after address changing is detected. Contributed by Lisheng Sun.
This commit is contained in:
parent
32607dbd98
commit
b94eba9f11
|
@ -638,6 +638,10 @@ public class Client implements AutoCloseable {
|
||||||
LOG.warn("Address change detected. Old: " + server.toString() +
|
LOG.warn("Address change detected. Old: " + server.toString() +
|
||||||
" New: " + currentAddr.toString());
|
" New: " + currentAddr.toString());
|
||||||
server = currentAddr;
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue