Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12282

Connection thread's name should be updated after address changing is detected

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0, 3.1.4, 3.2.2
    • Component/s: ipc
    • Labels:
      None

      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.

      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);
      }

        Attachments

        1. HADOOP-12282.002.patch
          1 kB
          Lisheng Sun
        2. HADOOP-12282-001.patch
          0.9 kB
          zhouyingchao

          Activity

            People

            • Assignee:
              leosun08 Lisheng Sun
              Reporter:
              sinago zhouyingchao
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: