Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-alpha
    • Component/s: datanode
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      This change modifies DatanodeID, which is part of the client to server protocol, therefore clients must be upgraded with servers.

      Description

      DatanodeID#getName, which returns a string containing the IP:xferPort of a Datanode, is used in a variety of contexts:

      1. Putting the ID in a log message
      2. Connecting to the DN for data transfer
      3. Getting a string to use as a key (eg for comparison)
      4. Using as a hostname, eg for excludes/includes, topology files

      Same for DatanodeID#getHost, which returns just the IP part, and sometimes we use it as a key, sometimes we tack on the IPC port, etc.

      Let's have a method for each use, eg toString can be used for #1, a new method (eg getDataXferAddr) for #2, a new method (eg getKey) for #3, new method (eg getHostID) for #4, etc. Aside from the code being more clear, we can change the value for particular uses, eg we can change the format in a log message without changing the address used that clients connect to the DN, or modify the address used for data transfer without changing the other uses.

        Attachments

        1. hdfs-3144.txt
          138 kB
          Eli Collins
        2. hdfs-3144.txt
          138 kB
          Eli Collins
        3. hdfs-3144.txt
          128 kB
          Eli Collins
        4. hdfs-3144.txt
          144 kB
          Eli Collins

          Issue Links

            Activity

              People

              • Assignee:
                eli Eli Collins
                Reporter:
                eli2 Eli Collins
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: