hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsuyoshi OZAWA (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MAPREDUCE-5876) SequenceFileRecordReader NPE if close() is called before initialize()
Date Mon, 05 May 2014 23:12:14 GMT

     [ https://issues.apache.org/jira/browse/MAPREDUCE-5876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tsuyoshi OZAWA updated MAPREDUCE-5876:
--------------------------------------

    Attachment: MAPREDUCE-5876.1.patch

Thanks for reporting this issue, [~reinis_v]. I could reproduce the issue. Attached patch
fixes it.

> SequenceFileRecordReader NPE if close() is called before initialize()
> ---------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5876
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5876
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 2.3.0, 2.4.0
>            Reporter: Reinis Vicups
>            Assignee: Tsuyoshi OZAWA
>         Attachments: MAPREDUCE-5876.1.patch
>
>
> org.apache.hadoop.mapreduce.lib.input.SequenceFileRecordReader extends org.apache.hadoop.mapreduce.RecordReader
which in turn implements java.io.Closeable.
> According to java spec the java.io.Closeable#close() has to be idempotent (http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html)
which is not.
> An NPE is being thrown if close() method is invoked without previously calling initialize()
method. This happens because SequenceFile.Reader in is null.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message