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

Improve StripedBlockReader#createBlockReader error logging

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha2
    • 3.0.0-alpha2
    • erasure-coding
    • None

    Description

      In StripedBlockReader#createBlockReader if any IOException is thrown, the error is logged at debug level and then returns a null. This means in a typical configuration an NPE may be thrown without logging a cause if the StripedBlockReader object is accessed.

      Attachments

        1. HDFS-10908.01.patch
          1 kB
          Manoj Govindassamy

        Activity

          Attaching patch to log BlockReader creation errors.

          Since BlockReaderRemote#newBlockReader throws IOException with information about the offset issues, logging the IOException should be sufficient to get the reason for BlockReader creation errors.

                throw new IOException("BlockReader: error in first chunk offset (" +
                    firstChunkOffset + ") startOffset is " +
                    startOffset + " for file " + file);
          
          manojg Manoj Govindassamy added a comment - Attaching patch to log BlockReader creation errors. Since BlockReaderRemote#newBlockReader throws IOException with information about the offset issues, logging the IOException should be sufficient to get the reason for BlockReader creation errors. throw new IOException("BlockReader: error in first chunk offset (" + firstChunkOffset + ") startOffset is " + startOffset + " for file " + file);
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 14s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
          +1 mvninstall 7m 50s trunk passed
          +1 compile 0m 47s trunk passed
          +1 checkstyle 0m 26s trunk passed
          +1 mvnsite 0m 56s trunk passed
          +1 mvneclipse 0m 13s trunk passed
          +1 findbugs 1m 44s trunk passed
          +1 javadoc 0m 54s trunk passed
          +1 mvninstall 0m 47s the patch passed
          +1 compile 0m 46s the patch passed
          +1 javac 0m 46s the patch passed
          +1 checkstyle 0m 25s the patch passed
          +1 mvnsite 0m 53s the patch passed
          +1 mvneclipse 0m 11s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 47s the patch passed
          +1 javadoc 0m 53s the patch passed
          +1 unit 72m 49s hadoop-hdfs in the patch passed.
          +1 asflicense 0m 18s The patch does not generate ASF License warnings.
          93m 6s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:9560f25
          JIRA Issue HDFS-10908
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831040/HDFS-10908.01.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux c662bfce42b7 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 10be459
          Default Java 1.8.0_101
          findbugs v3.0.0
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16939/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16939/console
          Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 14s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 7m 50s trunk passed +1 compile 0m 47s trunk passed +1 checkstyle 0m 26s trunk passed +1 mvnsite 0m 56s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 44s trunk passed +1 javadoc 0m 54s trunk passed +1 mvninstall 0m 47s the patch passed +1 compile 0m 46s the patch passed +1 javac 0m 46s the patch passed +1 checkstyle 0m 25s the patch passed +1 mvnsite 0m 53s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 47s the patch passed +1 javadoc 0m 53s the patch passed +1 unit 72m 49s hadoop-hdfs in the patch passed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 93m 6s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10908 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831040/HDFS-10908.01.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux c662bfce42b7 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 10be459 Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16939/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16939/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.

          LGTM. Test case not needed since it's a log message only improvement.

          weichiu Wei-Chiu Chuang added a comment - LGTM. Test case not needed since it's a log message only improvement.

          Committed it to trunk. Thanks manojg for the patch!

          weichiu Wei-Chiu Chuang added a comment - Committed it to trunk. Thanks manojg for the patch!
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10521 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10521/)
          HDFS-10908. Improve StripedBlockReader#createBlockReader error logging. (weichiu: rev 2ab1ef15c5e0b05fed5106d6bbecb3ead2b25f9a)

          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedBlockReader.java
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10521 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10521/ ) HDFS-10908 . Improve StripedBlockReader#createBlockReader error logging. (weichiu: rev 2ab1ef15c5e0b05fed5106d6bbecb3ead2b25f9a) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedBlockReader.java

          People

            manojg Manoj Govindassamy
            weichiu Wei-Chiu Chuang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: