You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Rodrigo Schmidt <rs...@facebook.com> on 2009/03/03 00:46:26 UTC

Why don't we throw an exception for CRC errors on CBZip2InputStream.java?

>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");
}

Is there any reason for this behavior?

The CRC code is working fine and CRC verification is useful to identify eventual bugs on CBZip2OutputStream.java.

I'm willing to change the method above if there's no objection to that:

https://issues.apache.org/jira/browse/HADOOP-5379

Cheers,
Rodrigo