[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-09-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13760285#comment-13760285
 ] 

Hudson commented on HIVE-5060:
--

FAILURE: Integrated in Hive-trunk-hadoop2 #410 (See 
[https://builds.apache.org/job/Hive-trunk-hadoop2/410/])
HIVE-5060: JDBC driver assumes executeStatement is synchronous (Henry Robinson 
via Brock Noland) (brock: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1520604)
* /hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java


 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-09-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13760419#comment-13760419
 ] 

Hudson commented on HIVE-5060:
--

FAILURE: Integrated in Hive-trunk-h0.21 #2314 (See 
[https://builds.apache.org/job/Hive-trunk-h0.21/2314/])
HIVE-5060: JDBC driver assumes executeStatement is synchronous (Henry Robinson 
via Brock Noland) (brock: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1520604)
* /hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java


 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-09-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13760766#comment-13760766
 ] 

Hudson commented on HIVE-5060:
--

FAILURE: Integrated in Hive-trunk-hadoop1-ptest #153 (See 
[https://builds.apache.org/job/Hive-trunk-hadoop1-ptest/153/])
HIVE-5060: JDBC driver assumes executeStatement is synchronous (Henry Robinson 
via Brock Noland) (brock: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1520604)
* /hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java


 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
Assignee: Henry Robinson
 Fix For: 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-09-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13760875#comment-13760875
 ] 

Hudson commented on HIVE-5060:
--

FAILURE: Integrated in Hive-trunk-hadoop2-ptest #85 (See 
[https://builds.apache.org/job/Hive-trunk-hadoop2-ptest/85/])
HIVE-5060: JDBC driver assumes executeStatement is synchronous (Henry Robinson 
via Brock Noland) (brock: 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1520604)
* /hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java


 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
Assignee: Henry Robinson
 Fix For: 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-09-05 Thread Brock Noland (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13759035#comment-13759035
 ] 

Brock Noland commented on HIVE-5060:


+1

 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.11.1, 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-09-04 Thread Vaibhav Gumashta (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13758113#comment-13758113
 ] 

Vaibhav Gumashta commented on HIVE-5060:


[~henryr] Thanks for posting this to rb. There has been some more progress on 
the async execution part of 
[HIVE-4569|https://issues.apache.org/jira/browse/HIVE-4569] here: 
[HIVE-4617|https://issues.apache.org/jira/browse/HIVE-4617]. I'll post my 
comments soon.



 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.11.1, 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-09-04 Thread Vaibhav Gumashta (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13758720#comment-13758720
 ] 

Vaibhav Gumashta commented on HIVE-5060:


[~henryr] The changes look good to me. I might add a few more changes though 
(in a separate patch), once 
[HIVE-4617|https://issues.apache.org/jira/browse/HIVE-4617] moves forward. +1 
from me (non-binding). Thanks a lot!

 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.11.1, 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-09-03 Thread Henry Robinson (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13756847#comment-13756847
 ] 

Henry Robinson commented on HIVE-5060:
--

[~vgumashta] - sorry about the delay, I've uploaded the patch to review board 
here: https://reviews.apache.org/r/13948/

The approach in HIVE-4569 will be more general, but this fixes an immediate 
issue for other implementations of the HS2 API at very little cost to Hive.

BTW, I believe the test failures from the patch are unrelated.

 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.11.1, 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-08-16 Thread Vaibhav Gumashta (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13741962#comment-13741962
 ] 

Vaibhav Gumashta commented on HIVE-5060:


[~henryr] [~brocknoland] Possible to add this to rb? I'm keen to take a look at 
this and compare with 
[HIVE-4569|https://issues.apache.org/jira/browse/HIVE-4569]. Thanks!

 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.11.1, 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-08-15 Thread Hive QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13740860#comment-13740860
 ] 

Hive QA commented on HIVE-5060:
---



{color:red}Overall{color}: -1 at least one tests failed

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12598099/HIVE-5060.patch

{color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 2859 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_udtf_not_supported2
org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_infer_bucket_sort_reducers_power_two
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/446/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/446/console

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests failed with: TestsFailedException: 2 tests failed
{noformat}

This message is automatically generated.

 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.11.1, 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-08-14 Thread Amareshwari Sriramadasu (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739437#comment-13739437
 ] 

Amareshwari Sriramadasu commented on HIVE-5060:
---

@Henry, HIVE-4569 adds another api to call execute asynchronously. After that, 
current code of jdbc driver should just work.
If we have a synchronous api, the clients such as jdbc can fetch results after 
the execute immediately without bombarding the server with so many get-status 
calls. So, i definitely see the need for two apis.

 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.11.1, 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous

2013-08-14 Thread Henry Robinson (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13740490#comment-13740490
 ] 

Henry Robinson commented on HIVE-5060:
--

[~amareshwari] - thanks for your comments! I have a couple of responses:

* For SELECT etc. queries, there's no need to do the polling (and the patch 
does not poll in that case), since the call to fetch the results will block 
until some are ready.
* The polling only happens 10 times a second, which should not overload any 
reasonable server even at quite high levels of concurrency
* I can see that it would be useful to have a call that was synchronous; it 
just seems that {{executeStatement}} was not designed to be it since it returns 
a handle. If the idea is not to poll its status, I'm not sure why 
{{executeStatement}} would return {{TOperationHandle}}. However, it will be 
good to have both APIs eventually, I would just rather that 
{{executeStatement}} was the async one.

 JDBC driver assumes executeStatement is synchronous
 ---

 Key: HIVE-5060
 URL: https://issues.apache.org/jira/browse/HIVE-5060
 Project: Hive
  Issue Type: Bug
  Components: JDBC
Affects Versions: 0.11.0
Reporter: Henry Robinson
 Fix For: 0.11.1, 0.12.0

 Attachments: 
 0001-HIVE-5060-JDBC-driver-assumes-executeStatement-is-sy.patch, 
 HIVE-5060.patch


 The JDBC driver seems to assume that {{ExecuteStatement}} is a synchronous 
 call when performing updates via {{executeUpdate}}, where the following 
 comment on the RPC in the Thrift file indicates otherwise:
 {code}
 // ExecuteStatement()
 //
 // Execute a statement.
 // The returned OperationHandle can be used to check on the
 // status of the statement, and to fetch results once the
 // statement has finished executing.
 {code}
 I understand that Hive's implementation of {{ExecuteStatement}} is blocking 
 (see https://issues.apache.org/jira/browse/HIVE-4569), but presumably other 
 implementations of the HiveServer2 API (and I'm talking specifically about 
 Impala here, but others might have a similar concern) should be free to 
 return a pollable {{OperationHandle}} per the specification.
 The JDBC driver's {{executeUpdate}} is as follows:
 {code}
 public int executeUpdate(String sql) throws SQLException {
 execute(sql);
 return 0;
   }
 {code}
 {{execute(sql)}} discards the {{OperationHandle}} that it gets from the 
 server after determining whether there are results to be fetched.
 This is problematic for us, because Impala will cancel queries that are 
 running when a session executes, but there's no easy way to be sure that an 
 {{INSERT}} statement has completed before terminating a session on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira