You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Naveen Gangam (JIRA)" <ji...@apache.org> on 2015/11/25 06:34:10 UTC

[jira] [Created] (HIVE-12517) Beeline's use of failed connection(s) causes failures and leaks.

Naveen Gangam created HIVE-12517:
------------------------------------

             Summary: Beeline's use of failed connection(s) causes failures and leaks.
                 Key: HIVE-12517
                 URL: https://issues.apache.org/jira/browse/HIVE-12517
             Project: Hive
          Issue Type: Bug
          Components: Hive
            Reporter: Naveen Gangam
            Assignee: Naveen Gangam
            Priority: Minor
             Fix For: 2.0.0


Beeline adds a bad connection(s) to the connection list and makes it the current connection, so any subsequent queries will attempt to use this bad connection and will fail. Even a "!close" would not work.
1) all queries fail unless !go is used.
2) !closeall cannot close the active connections either.
3) !exit will exit while attempting to establish these inactive connections without closing the active connections. So this could hold up server side resources.

{code}
beeline> !connect jdbc:hive2://localhost:10000 hive1 hive1
scan complete in 8ms
Connecting to jdbc:hive2://localhost:10000
Connected to: Apache Hive (version 2.0.0-SNAPSHOT)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://localhost:10000> !connect jdbc:hive2://localhost:10000 hive1 hive1
Connecting to jdbc:hive2://localhost:10000
Connected to: Apache Hive (version 2.0.0-SNAPSHOT)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
1: jdbc:hive2://localhost:10000> !connect jdbc:hive2://localhost:10000 hive1 hive1
Connecting to jdbc:hive2://localhost:10000
Connected to: Apache Hive (version 2.0.0-SNAPSHOT)
Driver: Hive JDBC (version 1.1.0-cdh5.7.0-SNAPSHOT)
Transaction isolation: TRANSACTION_REPEATABLE_READ
2: jdbc:hive2://localhost:10000> !tables
+------------+--------------+---------------------+-------------+----------+--+
| TABLE_CAT  | TABLE_SCHEM  |     TABLE_NAME      | TABLE_TYPE  | REMARKS  |
+------------+--------------+---------------------+-------------+----------+--+
|            | default      | char_nested_1       | TABLE       | NULL     |
|            | default      | src                 | TABLE       | NULL     |
|            | default      | char_nested_struct  | TABLE       | NULL     |
|            | default      | src_thrift          | TABLE       | NULL     |
|            | default      | x                   | TABLE       | NULL     |
+------------+--------------+---------------------+-------------+----------+--+
2: jdbc:hive2://localhost:10000> !list
3 active connections:
 #0  open     jdbc:hive2://localhost:10000
 #1  open     jdbc:hive2://localhost:10000
 #2  open     jdbc:hive2://localhost:10000
2: jdbc:hive2://localhost:10000> !connect jdbc:hive2://localhost:11000 hive1 hive1
Connecting to jdbc:hive2://localhost:11000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:11000: java.net.ConnectException: Connection refused (state=08S01,code=0)
3: jdbc:hive2://localhost:11000 (closed)> !tables
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:11000: java.net.ConnectException: Connection refused (state=08S01,code=0)
3: jdbc:hive2://localhost:11000 (closed)> !list
4 active connections:
 #0  open     jdbc:hive2://localhost:10000
 #1  open     jdbc:hive2://localhost:10000
 #2  open     jdbc:hive2://localhost:10000
 #3  closed   jdbc:hive2://localhost:11000
3: jdbc:hive2://localhost:11000 (closed)> !close
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:11000: java.net.ConnectException: Connection refused (state=08S01,code=0)
3: jdbc:hive2://localhost:11000 (closed)> !closeall
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:11000: java.net.ConnectException: Connection refused (state=08S01,code=0)
4: jdbc:hive2://localhost:11000 (closed)> !exit
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:11000: java.net.ConnectException: Connection refused (state=08S01,code=0)
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:11000: java.net.ConnectException: Connection refused (state=08S01,code=0)
{code}

The workaround is to use !go to set the current connection to a "good" connection.




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