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

Add more debug info to BlockInfoUnderConstruction#setGenerationStampAndVerifyReplicas

    Details

      Description

      When I was looking at some replica loss issue, I got the following info from log

      2014-10-13 01:54:53,104 INFO BlockStateChange: BLOCK* Removing stale replica from location x.x.x.x
      

      I could just know that a replica is removed, but I don't know which block and its timestamp. I need to know the id and timestamp of the block from the log file.
      So it's better to add more info including block id and timestamp to the code snippet

          for (ReplicaUnderConstruction r : replicas) {
            if (genStamp != r.getGenerationStamp()) {
              r.getExpectedLocation().removeBlock(this);
              NameNode.blockStateChangeLog.info("BLOCK* Removing stale replica "
                  + "from location: " + r.getExpectedLocation());
            }
          }
      

        Attachments

        1. HDFS-7284.005.patch
          2 kB
          Wei-Chiu Chuang
        2. HDFS-7284.004.patch
          2 kB
          Wei-Chiu Chuang
        3. HDFS-7284.003.patch
          3 kB
          Wei-Chiu Chuang
        4. HDFS-7284.002.patch
          1 kB
          Wei-Chiu Chuang
        5. HDFS-7284.001.patch
          0.9 kB
          Wei-Chiu Chuang

          Activity

            People

            • Assignee:
              jojochuang Wei-Chiu Chuang
              Reporter:
              huLiu Hu Liu,
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: