Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-6

in FSNamesystem.registerDatanode, dnAddress should be resolved (rarely occured)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None
    • CentOS 5.2, JDK 1.6

    Description

      In FSNamesystem.java registerDatanode(), if the datanode address cannot be
      got from the RPC Server, it will use that from the datanode report:

      String dnAddress = Server.getRemoteAddress();
      if (dnAddress == null)

      { // Mostly called inside an RPC. // But if not, use address passed by the data-node. dnAddress = nodeReg.getHost(); }

      The getHost() may return the hostname or address, while the Server.getRemoteAddress()
      will return the IP address, which is the dnAddress should be. Thus I think the it should be

      if (dnAddress == null)

      { // Mostly called inside an RPC. // But if not, use address passed by the data-node. dnAddress = InetAddress.getByName(nodeReg.getHost()).getHostAddress(); }

      I know it should not be called in most situation, but I indeed use that, and I suppose the
      dnAddress should be an IP address.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gnawux Wang Xu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified