hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-8176) Close of FSDataOutputStream in OrcRecordUpdater ctor should be in finally clause
Date Fri, 08 Apr 2016 19:19:25 GMT

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

Ted Yu updated HIVE-8176:
-------------------------
    Description: 
{code}
    try {
      FSDataOutputStream strm = fs.create(new Path(path, ACID_FORMAT), false);
      strm.writeInt(ORC_ACID_VERSION);
      strm.close();
    } catch (IOException ioe) {
{code}
If strm.writeInt() throws IOE, strm would be left unclosed.

  was:
{code}
    try {
      FSDataOutputStream strm = fs.create(new Path(path, ACID_FORMAT), false);
      strm.writeInt(ORC_ACID_VERSION);
      strm.close();
    } catch (IOException ioe) {
{code}

If strm.writeInt() throws IOE, strm would be left unclosed.


> Close of FSDataOutputStream in OrcRecordUpdater ctor should be in finally clause
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-8176
>                 URL: https://issues.apache.org/jira/browse/HIVE-8176
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: SUYEON LEE
>            Priority: Minor
>         Attachments: HIVE-8176.patch, HIVE-8176.v1.patch
>
>
> {code}
>     try {
>       FSDataOutputStream strm = fs.create(new Path(path, ACID_FORMAT), false);
>       strm.writeInt(ORC_ACID_VERSION);
>       strm.close();
>     } catch (IOException ioe) {
> {code}
> If strm.writeInt() throws IOE, strm would be left unclosed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message