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

NetworkTopology#getWeightUsingNetworkLocation return unexpected result

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: net
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Consider the following scenario:
      1. there are 4 slaves and topology like:
      Rack: /IDC/RACK1
      hostname1
      hostname2
      Rack: /IDC/RACK2
      hostname3
      hostname4
      2. Reader from hostname1, and calculate weight between reader and [hostname1, hostname3, hostname4] by #getWeight, and their corresponding values are [0,4,4]
      3. Reader from client which is not in the topology, and in the same IDC but in none rack of the topology, and calculate weight between reader and [hostname1, hostname3, hostname4] by #getWeightUsingNetworkLocation, and their corresponding values are [2,2,2]
      4. Other different Reader can get the similar results.
      The weight result for case #3 is obviously not the expected value, the truth is [4,4,4]. this issue may cause reader not really following arrange: local -> local rack -> remote rack.

      After dig the detailed implement, the root cause is #getWeightUsingNetworkLocation only calculate distance between Racks rather than hosts.

      I think we should add constant 2 to correct the weight of #getWeightUsingNetworkLocation.

        Attachments

        1. HADOOP-16161.009.patch
          8 kB
          He Xiaoqiao
        2. HADOOP-16161.008.patch
          8 kB
          He Xiaoqiao
        3. HADOOP-16161.007.patch
          8 kB
          He Xiaoqiao
        4. HADOOP-16161.006.patch
          5 kB
          He Xiaoqiao
        5. HADOOP-16161.005.patch
          5 kB
          He Xiaoqiao
        6. HADOOP-16161.004.patch
          5 kB
          He Xiaoqiao
        7. HADOOP-16161.003.patch
          6 kB
          He Xiaoqiao
        8. HADOOP-16161.002.patch
          6 kB
          He Xiaoqiao
        9. HADOOP-16161.001.patch
          3 kB
          He Xiaoqiao

          Activity

            People

            • Assignee:
              hexiaoqiao He Xiaoqiao
              Reporter:
              hexiaoqiao He Xiaoqiao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: