[
https://issues.apache.org/jira/browse/HADOOP-12282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lisheng Sun updated HADOOP-12282:
---------------------------------
Description:
In a hadoop hdfs cluster, I changed the standby Namenode's ip address (the
hostname is not changed and the routing tables are updated). After the change,
the cluster is running as normal.
However, I found that the debug message of datanode's IPC still prints the
original ip address. By looking into the implementation, it turns out that the
original address is used as the thread's name. I think the thread's name should
be changed if the address change is detected. Because one of the constituent
elements of the thread's name is server.
{code:java}
Connection(ConnectionId remoteId, int serviceClass,
Consumer<Connection> removeMethod) {
......
UserGroupInformation ticket = remoteId.getTicket();
// try SASL if security is enabled or if the ugi contains tokens.
// this causes a SIMPLE client with tokens to attempt SASL
boolean trySasl = UserGroupInformation.isSecurityEnabled() ||
(ticket != null && !ticket.getTokens().isEmpty());
this.authProtocol = trySasl ? AuthProtocol.SASL : AuthProtocol.NONE;
this.setName("IPC Client (" + socketFactory.hashCode() +") connection to " +
server.toString() +
" from " + ((ticket==null)?"an unknown user":ticket.getUserName()));
this.setDaemon(true);
}{code}
was:
In a hadoop hdfs cluster, I changed the standby Namenode's ip address (the
hostname is not changed and the routing tables are updated). After the change,
the cluster is running as normal.
However, I found that the debug message of datanode's IPC still prints the
original ip address. By looking into the implementation, it turns out that the
original address is used as the thread's name. I think the thread's name should
be changed if the address change is detected.
{code:java}
Connection(ConnectionId remoteId, int serviceClass,
Consumer<Connection> removeMethod) {
......
UserGroupInformation ticket = remoteId.getTicket();
// try SASL if security is enabled or if the ugi contains tokens.
// this causes a SIMPLE client with tokens to attempt SASL
boolean trySasl = UserGroupInformation.isSecurityEnabled() ||
(ticket != null && !ticket.getTokens().isEmpty());
this.authProtocol = trySasl ? AuthProtocol.SASL : AuthProtocol.NONE;
this.setName("IPC Client (" + socketFactory.hashCode() +") connection to " +
server.toString() +
" from " + ((ticket==null)?"an unknown user":ticket.getUserName()));
this.setDaemon(true);
}{code}
> Connection thread's name should be updated after address changing is detected
> -----------------------------------------------------------------------------
>
> Key: HADOOP-12282
> URL: https://issues.apache.org/jira/browse/HADOOP-12282
> Project: Hadoop Common
> Issue Type: Bug
> Components: ipc
> Reporter: zhouyingchao
> Assignee: Lisheng Sun
> Priority: Major
> Attachments: HADOOP-12282-001.patch
>
>
> In a hadoop hdfs cluster, I changed the standby Namenode's ip address (the
> hostname is not changed and the routing tables are updated). After the
> change, the cluster is running as normal.
> However, I found that the debug message of datanode's IPC still prints the
> original ip address. By looking into the implementation, it turns out that
> the original address is used as the thread's name. I think the thread's name
> should be changed if the address change is detected. Because one of the
> constituent elements of the thread's name is server.
> {code:java}
> Connection(ConnectionId remoteId, int serviceClass,
> Consumer<Connection> removeMethod) {
> ......
> UserGroupInformation ticket = remoteId.getTicket();
> // try SASL if security is enabled or if the ugi contains tokens.
> // this causes a SIMPLE client with tokens to attempt SASL
> boolean trySasl = UserGroupInformation.isSecurityEnabled() ||
> (ticket != null && !ticket.getTokens().isEmpty());
> this.authProtocol = trySasl ? AuthProtocol.SASL : AuthProtocol.NONE;
> this.setName("IPC Client (" + socketFactory.hashCode() +") connection to " +
> server.toString() +
> " from " + ((ticket==null)?"an unknown user":ticket.getUserName()));
> this.setDaemon(true);
> }{code}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]