Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0FE4C106B9 for ; Fri, 6 Sep 2013 23:49:59 +0000 (UTC) Received: (qmail 60006 invoked by uid 500); 6 Sep 2013 23:49:58 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 59958 invoked by uid 500); 6 Sep 2013 23:49:58 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 59946 invoked by uid 500); 6 Sep 2013 23:49:58 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 59942 invoked by uid 99); 6 Sep 2013 23:49:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Sep 2013 23:49:58 +0000 Date: Fri, 6 Sep 2013 23:49:58 +0000 (UTC) From: "Hudson (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-5060) JDBC driver assumes executeStatement is synchronous MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-5060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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-SVN&view=rev&rev=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