zuotingbing created SPARK-22058:
-----------------------------------

             Summary: the BufferedInputStream will not be closed if an 
exception occurs
                 Key: SPARK-22058
                 URL: https://issues.apache.org/jira/browse/SPARK-22058
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
    Affects Versions: 2.2.0
            Reporter: zuotingbing


EventLoggingListener use 
{code:java}
 val in = new BufferedInputStream(fs.open(log))
{code} 
and will close it if an exception occurs
{code:java}
try {
      codec.map(_.compressedInputStream(in)).getOrElse(in)
    } catch {
      case e: Exception =>
        in.close()
        throw e
    }
{code}

But, if 
{code:java}
CompressionCodec.createCodec(new SparkConf, c)
{code} throws an exception, the BufferedInputStream
{code:java}
in
{code} will not be closed anymore.






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to