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 "Chris Douglas (JIRA)" <ji...@apache.org> on 2009/05/05 02:28:30 UTC
[jira] Updated: (HADOOP-5476) calling new SequenceFile.Reader(...)
leaves an InputStream open, if the given sequence file is broken
[ https://issues.apache.org/jira/browse/HADOOP-5476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Douglas updated HADOOP-5476:
----------------------------------
Status: Open (was: Patch Available)
Sorry for the long delay in reviewing this.
* TestSequenceFile fails on trunk:
{noformat}
Testcase: testCloseForErroneousSequenceFile took 0.102 sec
Caused an ERROR
null
java.lang.NullPointerException
at org.apache.hadoop.fs.RawLocalFileSystem$TrackingFileInputStream.read(RawLocalFileSystem.java:91)
at org.apache.hadoop.fs.RawLocalFileSystem$LocalFSFileInputStream.read(RawLocalFileSystem.java:142)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at java.io.DataInputStream.readFully(DataInputStream.java:178)
at java.io.DataInputStream.readFully(DataInputStream.java:152)
at org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSInputChecker.<init>(ChecksumFileSystem.java:134)
at org.apache.hadoop.fs.ChecksumFileSystem.open(ChecksumFileSystem.java:283)
at org.apache.hadoop.io.SequenceFile$Reader.openFile(SequenceFile.java:1453)
at org.apache.hadoop.io.TestSequenceFile$1.openFile(TestSequenceFile.java:494)
at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1430)
at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1423)
at org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:1418)
at org.apache.hadoop.io.TestSequenceFile$1.<init>(TestSequenceFile.java:491)
at org.apache.hadoop.io.TestSequenceFile.testCloseForErroneousSequenceFile(TestSequenceFile.java:491)
{noformat}
If the unit test obtains the LFS by calling {{FileSystem.getLocal(conf)}} then everything works as designed.
* The conf assignment can be outside the try block
* Instead of try/finally, catching IOException, attempting a close, logging- rather than ignoring- exceptions thrown from close, then re-throwing the IOException would be preferred.
> calling new SequenceFile.Reader(...) leaves an InputStream open, if the given sequence file is broken
> -----------------------------------------------------------------------------------------------------
>
> Key: HADOOP-5476
> URL: https://issues.apache.org/jira/browse/HADOOP-5476
> Project: Hadoop Core
> Issue Type: Bug
> Components: io
> Affects Versions: 0.19.1
> Reporter: Michael Tamm
> Assignee: Michael Tamm
> Attachments: test_and_fix_for_HADOOP-5476.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.