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

VolumeScanner prints incorrect IOException in reportBadBlocks operation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      VolumeScanner throws incorrect IOException in datanode.reportBadBlocks. The related codes:

          public void handle(ExtendedBlock block, IOException e) {
            FsVolumeSpi volume = scanner.volume;
            ...
            try {
              scanner.datanode.reportBadBlocks(block, volume);
            } catch (IOException ie) {
              // This is bad, but not bad enough to shut down the scanner.
              LOG.warn("Cannot report bad " + block.getBlockId(), e);
            }
          }
      

      The IOException that printed in the log should be ie rather than e which was passed in method handle(ExtendedBlock block, IOException e).
      It will be a important info that can help us to know why datanode reporBadBlocks failed.

      Attachments

        1. HDFS-10626.004.patch
          1 kB
          Yiqun Lin
        2. HDFS-10626.003.patch
          0.9 kB
          Yiqun Lin
        3. HDFS-10626.002.patch
          0.8 kB
          Yiqun Lin
        4. HDFS-10626.001.patch
          0.8 kB
          Yiqun Lin

        Issue Links

          Activity

            People

              linyiqun Yiqun Lin
              linyiqun Yiqun Lin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: