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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.6.0
    • Fix Version/s: None
    • Component/s: namenode
    • Labels:

      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

            • Assignee:
              surendrasingh Surendra Singh Lilhore
              Reporter:
              surendrasingh Surendra Singh Lilhore
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: