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

Incorrect count for Missing Replicas in FSCK report

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 0.23.3, 2.0.2-alpha
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      Scenario:
      Cluster running in HA mode with 2 DNs. Files are written with replication factor as 3.
      There are 7 blocks in cluster.
      FSCK report is including all blocks in UnderReplicated Blocks as well as Missing Replicas.

      HOST-XX-XX-XX-102:/home/Apr4/hadoop-2.0.0-SNAPSHOT/bin # ./hdfs fsck /
      Connecting to namenode via http://XX.XX.XX.55:50070
      FSCK started by root (auth:SIMPLE) from /XX.XX.XX.102 for path / at Wed Apr 04 17:28:37 IST 2012
      .
      /1: Under replicated BP-534619337-XX.XX.XX.55-1333526344705:blk_2551710840802340037_1002. Target Replicas is 3 but found 2 replica(s).
      .
      /2: Under replicated BP-534619337-XX.XX.XX.55-1333526344705:blk_-3851276776144500288_1004. Target Replicas is 3 but found 2 replica(s).
      .
      /3: Under replicated BP-534619337-XX.XX.XX.55-1333526344705:blk_-3210606555285049524_1006. Target Replicas is 3 but found 2 replica(s).
      .
      /4: Under replicated BP-534619337-XX.XX.XX.55-1333526344705:blk_4028835120510075310_1008. Target Replicas is 3 but found 2 replica(s).
      .
      /5: Under replicated BP-534619337-XX.XX.XX.55-1333526344705:blk_-5238093749956876969_1010. Target Replicas is 3 but found 2 replica(s).
      .
      /testrenamed/file1renamed: Under replicated BP-534619337-XX.XX.XX.55-1333526344705:blk_-5669194716756513504_1012. Target Replicas is 3 but found 2 replica(s).
      .
      /testrenamed/file2: Under replicated BP-534619337-XX.XX.XX.55-1333526344705:blk_8510284478280941311_1014. Target Replicas is 3 but found 2 replica(s).
      Status: HEALTHY
      Total size: 33215 B
      Total dirs: 3
      Total files: 7 (Files currently being written: 1)
      Total blocks (validated): 7 (avg. block size 4745 B)
      Minimally replicated blocks: 7 (100.0 %)
      Over-replicated blocks: 0 (0.0 %)
      Under-replicated blocks: 7 (100.0 %)
      Mis-replicated blocks: 0 (0.0 %)
      Default replication factor: 3
      Average block replication: 2.0
      Corrupt blocks: 0
      Missing replicas: 7 (50.0 %)
      Number of data-nodes: 2
      Number of racks: 1
      FSCK ended at Wed Apr 04 17:28:37 IST 2012 in 2 milliseconds

      The filesystem under path '/' is HEALTHY

      Also it indicates a measure as 50% in brackets (There are only 7 blocks in cluster and so if all 7 are included as Missing replicas it should be 100%)

        Attachments

        1. HDFS-3442.patch
          2 kB
          Andrew Wang
        2. HDFS-3442-2.patch
          8 kB
          Andrew Wang
        3. HDFS-3442-3.patch
          12 kB
          Andrew Wang

          Activity

            People

            • Assignee:
              andrew.wang Andrew Wang
              Reporter:
              suja suja s
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: