Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18532

Hive Connection can't be closed if there is an error while creating session

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      To open a hiveconnection we have to

      
      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);
      }
      }
      

      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.

      Attachments

        1. HIVE-18532.1.patch
          3 kB
          Purshotam Shah

        Activity

          People

            puru Purshotam Shah
            puru Purshotam Shah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: