hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Broberg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8615) EOFException in DecompressorStream.java needs to be more verbose
Date Tue, 24 Jul 2012 07:44:35 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-8615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421247#comment-13421247

Tim Broberg commented on HADOOP-8615:

I can see how that would really help, and what a pain it is to try to guess which stream we're
dealing with.

Unfortunately, DecompressorStream doesn't have any way to know the name of the file or even
if the InputStream is a file. If it is, it's more than likely to be buffered such that DecompressorStream
never "sees" the actual FileInputStream. ...and even if he did have the FileInputStream I'm
not aware of any way to retrieve the filename.

We could try to make each caller that creates a DecompressorStream from a file log debug information
regarding which file is being used, but how would we correlate this message with a particular

The best solution I can think of - Perhaps creators of DecompressionStream's should catch
EOFException and then print out detailed debug information.
> EOFException in DecompressorStream.java needs to be more verbose
> ----------------------------------------------------------------
>                 Key: HADOOP-8615
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8615
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.20.2
>            Reporter: Jeff Lord
> In ./src/core/org/apache/hadoop/io/compress/DecompressorStream.java
> The following exception should at least pass back the file that it encounters this error
in relation to:
>   protected void getCompressedData() throws IOException {
>     checkStream();
>     int n = in.read(buffer, 0, buffer.length);
>     if (n == -1) {
>       throw new EOFException("Unexpected end of input stream");
>     }
> This would help greatly to debug bad/corrupt files.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message