Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      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.

        Activity

        Wang Xu created issue -
        Owen O'Malley made changes -
        Field Original Value New Value
        Project Hadoop Common [ 12310240 ] HDFS [ 12310942 ]
        Key HADOOP-5230 HDFS-6
        Affects Version/s 0.21.0 [ 12313563 ]
        Component/s dfs [ 12310710 ]
        Harsh J made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            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

                Development