[
https://issues.apache.org/jira/browse/HDFS-5750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ted Yu updated HDFS-5750:
-------------------------
Description:
stm is assigned to in.
But stm may point to another InputStream :
{code}
if(compressionClass != null) {
CompressionCodec codec = (CompressionCodec)
ReflectionUtils.newInstance(compressionClass, new Configuration());
in = codec.createInputStream(stm);
{code}
stm should be closed in the finally block.
was:
stm is assigned to in
But stm may point to another InputStream :
{code}
if(compressionClass != null) {
CompressionCodec codec = (CompressionCodec)
ReflectionUtils.newInstance(compressionClass, new Configuration());
in = codec.createInputStream(stm);
{code}
stm should be closed in the finally block.
> JHLogAnalyzer#parseLogFile() should close stm upon return
> ---------------------------------------------------------
>
> Key: HDFS-5750
> URL: https://issues.apache.org/jira/browse/HDFS-5750
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> stm is assigned to in.
> But stm may point to another InputStream :
> {code}
> if(compressionClass != null) {
> CompressionCodec codec = (CompressionCodec)
> ReflectionUtils.newInstance(compressionClass, new
> Configuration());
> in = codec.createInputStream(stm);
> {code}
> stm should be closed in the finally block.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]