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

Inconsistent report of decommissioning DataNodes between dfsadmin and NameNode webui

    XMLWordPrintableJSON

    Details

      Description

      It's observed that dfsadmin report list DNs in the decomm state while NN UI list DNs in dead state.

      I found what happens is:

      NN webui uses two steps to get the result:

      • first collect a list of all alive DNs,
      • traverse through all live DNs to find decommissioning DNs.

      It calls the following method to decide whether a DN is dead or alive:

        /** Is the datanode dead? */
        boolean isDatanodeDead(DatanodeDescriptor node) {
          return (node.getLastUpdate() <
                  (Time.now() - heartbeatExpireInterval));
        }
      

      On the other hand, dfsadmin traverse all DNs to find to all decommissioning DNs (check whether a DN is in AdminStates.DECOMMISSION_INPROGRESS state), without checking whether a DN is dead or alive like above.

      The problem is, when a DN is determined to be dead, its state may still be AdminStates.DECOMMISSION_INPROGRESS .

        Attachments

        1. HDFS-7497.001.patch
          3 kB
          Yongjun Zhang

          Activity

            People

            • Assignee:
              yzhangal Yongjun Zhang
              Reporter:
              yzhangal Yongjun Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: