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

dfs.namenode.replication.considerLoad does not consider decommissioned nodes

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha, 2.0.6-alpha, 2.2.0, 3.0.0-alpha1
    • 2.3.0
    • namenode
    • None
    • Reviewed

    Description

      In DefaultBlockPlacementPolicy, there is a setting dfs.namenode.replication.considerLoad which tries to balance the load of the cluster when choosing replica locations. This code does not take into account decommissioned nodes.

      The code for considerLoad calculates the load by doing: TotalClusterLoad / numNodes. However, numNodes includes decommissioned nodes (which have 0 load). Therefore, the average load is artificially low. Example:

      TotalLoad = 250
      numNodes = 100
      decommissionedNodes = 70
      remainingNodes = numNodes - decommissionedNodes = 30

      avgLoad = 250/100 = 2.50
      trueAvgLoad = 250 / 30 = 8.33

      If the real load of the remaining 30 nodes is (on average) 8.33, this is more than 2x the calculated average load of 2.50. This causes these nodes to be rejected as replica locations. The final result is that all nodes are rejected, and no replicas can be placed.

      See exceptions printed from client during this scenario: https://gist.github.com/bbeaudreault/49c8aa4bb231de54e9c1

      Attachments

        1. HDFS-5837.patch
          9 kB
          Tao Luo
        2. HDFS-5837_C.patch
          10 kB
          Tao Luo
        3. HDFS-5837_C_branch_2.2.0.patch
          10 kB
          Tao Luo
        4. HDFS-5837_branch_2.2.0.patch
          10 kB
          Tao Luo
        5. HDFS-5837_B.patch
          9 kB
          Tao Luo

        Issue Links

        Activity

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

          People

            taoluo Tao Luo
            bbeaudreault Bryan Beaudreault
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment