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

Purshotam Shah updated HIVE-18532:
----------------------------------
    Status: Patch Available  (was: Open)

> Hive Connection can't be closed if there is an error while creating session
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-18532
>                 URL: https://issues.apache.org/jira/browse/HIVE-18532
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Purshotam Shah
>            Assignee: Purshotam Shah
>            Priority: Major
>         Attachments: HIVE-18532-V1.patch
>
>
> To open a hiveconnection we have to
> {code}
> HiveConnection connection = null;
> try {
> connection = new HiveConnection(uri, new Properties());
> } finally {
> if (connection != null)
> try {
> connection.close();
> } catch (SQLException e) {
> LOGGER.error("Error closing connection, ignored.", e);
> }
> }
> {code}
> HiveConnection opens the opensTransport and tries to create a session in the 
> constructor.
> If opensTransport succeed, but session creates fails because of namenode 
> error or any other error, HiveConnection can't be closed.
> Since construction fails, the hiveconnection object will be null and the 
> client can't close it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to