hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zsolt Tóth (JIRA) <>
Subject [jira] [Created] (HIVE-13626) Unable to cancel certain queries [Spark Branch]
Date Wed, 27 Apr 2016 13:08:12 GMT
Zsolt Tóth created HIVE-13626:

             Summary: Unable to cancel certain queries [Spark Branch]
                 Key: HIVE-13626
             Project: Hive
          Issue Type: Bug
          Components: Spark
         Environment: CDH5.7 single node docker
            Reporter: Zsolt Tóth

To reproduce:
1. Submit a query to Hive through JDBC
2. Cancel (almost) immediately

For the query _SELECT DISTINCT a FROM test_ the Hive log says: "java.lang.Exception: Failed
to submit Spark work, please retry later" ... "Caused by: java.lang.InterruptedException".
After I call close() on the statement and the connection, the application changes to FINISHED/SUCCEEDED
state (as expected).

However, for the query _SELECT a FROM test order by a_  Hive log says: "org.apache.hadoop.hive.ql.metadata.HiveException:
Failed to create spark client." ... "Caused by: java.lang.RuntimeException: java.lang.InterruptedException".
Calling close() seems to have no effect, the yarn application is stuck in RUNNING state.

If I cancel the second query later (e.g. after 10 secs), the application closes with FINISHED/SUCCEEDED
(as expected).

Code snippet:
final Statement st = connection.createStatement();
new Thread() {
	public void run() {

ResultSet r = null;
try {
	// r = st.executeQuery("SELECT DISTINCT a FROM test");
	r = st.executeQuery("SELECT a FROM test order by a");
} catch (SQLException e) {
	if (st != null) {
	if (connection != null) {

This message was sent by Atlassian JIRA

View raw message