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

NetworkTopology#getWeightUsingNetworkLocation return unexpected result

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0, 3.1.4, 3.2.2
    • net
    • None
    • 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
          Xiaoqiao He
        2. HADOOP-16161.008.patch
          8 kB
          Xiaoqiao He
        3. HADOOP-16161.007.patch
          8 kB
          Xiaoqiao He
        4. HADOOP-16161.006.patch
          5 kB
          Xiaoqiao He
        5. HADOOP-16161.005.patch
          5 kB
          Xiaoqiao He
        6. HADOOP-16161.004.patch
          5 kB
          Xiaoqiao He
        7. HADOOP-16161.003.patch
          6 kB
          Xiaoqiao He
        8. HADOOP-16161.002.patch
          6 kB
          Xiaoqiao He
        9. HADOOP-16161.001.patch
          3 kB
          Xiaoqiao He

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hexiaoqiao Xiaoqiao He Assign to me
            hexiaoqiao Xiaoqiao He
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment