Hadoop Common
  1. Hadoop Common
  2. HADOOP-5379

Throw exception instead of writing to System.err when there is a CRC error on CBZip2InputStream

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.21.0
    • Fix Version/s: 0.19.2, 0.20.0
    • Component/s: io
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      From org.apache.hadoop.io.compress.bzip2.CBZip2InputStream.java:

      private static void reportCRCError() throws IOException {
         // The clean way would be to throw an exception.
         // throw new IOException("crc error");
      
         // Just print a message, like the previous versions of this class did
         System.err.println("BZip2 CRC error");
      }
      
      1. HADOOP-5379.patch
        0.8 kB
        Rodrigo Schmidt

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          7d 23m 1 Rodrigo Schmidt 10/Mar/09 00:02
          Patch Available Patch Available Resolved Resolved
          2d 5h 52m 1 Zheng Shao 12/Mar/09 05:54
          Resolved Resolved Closed Closed
          42d 13h 23m 1 Nigel Daley 23/Apr/09 19:18
          Nigel Daley made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Nigel Daley made changes -
          Fix Version/s 0.21.0 [ 12313563 ]
          Robert Chansler made changes -
          Release Note Edit release notes for publication.
          Hide
          Robert Chansler added a comment -

          Edit release notes for publication.

          Show
          Robert Chansler added a comment - Edit release notes for publication.
          Robert Chansler made changes -
          Release Note HADOOP-5379. CBZip2InputStream to throw IOException on data crc error. (Rodrigo Schmidt via zshao) Edit release notes for publication.
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #778 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/778/ )
          Zheng Shao made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Reviewed]
          Release Note Throws exception if CRC verification fails during decompression of Bzip2-compressed data. HADOOP-5379. CBZip2InputStream to throw IOException on data crc error. (Rodrigo Schmidt via zshao)
          Resolution Fixed [ 1 ]
          Hide
          Zheng Shao added a comment -

          Committed. Thanks Rodrigo!

          Show
          Zheng Shao added a comment - Committed. Thanks Rodrigo!
          Hide
          Zheng Shao added a comment -

          +1

          Show
          Zheng Shao added a comment - +1
          Hide
          Rodrigo Schmidt added a comment -

          The patch simply throws an exception instead of writing to System.err. It's a simple change on the way errors are reported and doesn't require extra tests.

          Show
          Rodrigo Schmidt added a comment - The patch simply throws an exception instead of writing to System.err. It's a simple change on the way errors are reported and doesn't require extra tests.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12401785/HADOOP-5379.patch
          against trunk revision 752073.

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no tests are needed for this patch.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-minerva.apache.org/43/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-minerva.apache.org/43/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-minerva.apache.org/43/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-minerva.apache.org/43/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12401785/HADOOP-5379.patch against trunk revision 752073. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-minerva.apache.org/43/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-minerva.apache.org/43/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-minerva.apache.org/43/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-minerva.apache.org/43/console This message is automatically generated.
          Rodrigo Schmidt made changes -
          Link This issue relates to HADOOP-3646 [ HADOOP-3646 ]
          Rodrigo Schmidt made changes -
          Link This issue is related to HADOOP-3646 [ HADOOP-3646 ]
          Rodrigo Schmidt made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Release Note Throws exception if CRC verification fails during decompression of Bzip2-compressed data.
          Fix Version/s 0.19.2 [ 12313650 ]
          Fix Version/s 0.20.0 [ 12313438 ]
          Fix Version/s 0.21.0 [ 12313563 ]
          Rodrigo Schmidt made changes -
          Attachment HADOOP-5379.patch [ 12401785 ]
          Rodrigo Schmidt made changes -
          Link This issue is related to HADOOP-3646 [ HADOOP-3646 ]
          Rodrigo Schmidt made changes -
          Field Original Value New Value
          Description From org.apache.hadoop.io.compress.bzip2.CBZip2InputStream.java:

          private static void reportCRCError() throws IOException {
             // The clean way would be to throw an exception.
             // throw new IOException("crc error");

             // Just print a message, like the previous versions of this class did
             System.err.println("BZip2 CRC error");
          }
          From org.apache.hadoop.io.compress.bzip2.CBZip2InputStream.java:


          {code}
          private static void reportCRCError() throws IOException {
             // The clean way would be to throw an exception.
             // throw new IOException("crc error");

             // Just print a message, like the previous versions of this class did
             System.err.println("BZip2 CRC error");
          }
          {code}
          Rodrigo Schmidt created issue -

            People

            • Assignee:
              Rodrigo Schmidt
              Reporter:
              Rodrigo Schmidt
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development