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

Fetching live/dead datanode list with arg true for removeDecommissionNode,returns list with decom node.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.7.4
    • None
    • None
    • Reviewed

    Description

      Current implementation:
      ======================

      DatanodeManager#removeDecomNodeFromList() , Decommissioned node will be removed from dead/live node list only if below conditions are met
      I . If the Include list is not empty.
      II. If include and exclude list does not have decommissioned node and node state is decommissioned.

            if (!hostFileManager.hasIncludes()) {
                    return;
             }
      
            if ((!hostFileManager.isIncluded(node)) && (!hostFileManager.isExcluded(node))
                && node.isDecommissioned()) {
              // Include list is not empty, an existing datanode does not appear
              // in both include or exclude lists and it has been decommissioned.
              // Remove it from the node list.
              it.remove();
            }
      

      As mentioned in javadoc a datanode cannot be in "already decommissioned datanode state".
      Following the steps mentioned in javadoc datanode state is "dead" and not decommissioned.

      Can we avoid the unnecessary checks and have check for the node is in decommissioned state then remove from node list. ?
      Please provide your feedback.

      Attachments

        1. HDFS-8780.1.patch
          8 kB
          J.Andreina
        2. HDFS-8780.2.patch
          8 kB
          J.Andreina
        3. HDFS-8780.3.patch
          8 kB
          J.Andreina
        4. HDFS-8780-branch-2.7.patch
          7 kB
          Konstantin Shvachko

        Issue Links

          Activity

            People

              andreina J.Andreina
              andreina J.Andreina
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: