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

BlockManager.getUnderReplicatedBlocksCount() is not giving correct count if namenode in safe mode.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 2.6.0
    • None
    • namenode

    Description

      underReplicatedBlocksCount update by the updateState() API.

       void updateState() {
          pendingReplicationBlocksCount = pendingReplications.size();
          underReplicatedBlocksCount = neededReplications.size();
          corruptReplicaBlocksCount = corruptReplicas.size();
        }
       

      but this will not call when NN in safe mode. This is happening because "computeDatanodeWork()" we will return 0 if NN in safe mode

        int computeDatanodeWork() {
         .........
          if (namesystem.isInSafeMode()) {
            return 0;
          }
          ....................
          ....................
          this.updateState();
          ....................
          ....................
        }
       

      Attachments

        1. HDFS-8296.patch
          2 kB
          Surendra Singh Lilhore

        Activity

          People

            surendralilhore Surendra Singh Lilhore
            surendralilhore Surendra Singh Lilhore
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: