hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From surendra lilhore <surendra.lilh...@huawei.com>
Subject RE: HiveServer2 : Can we perform parallel operation one same statement object in JDBC connection ?
Date Thu, 03 Apr 2014 04:23:55 GMT
Thanks Xuefu for the reply.

-----Original Message-----
From: Xuefu Zhang [mailto:xzhang@cloudera.com] 
Sent: 02 April 2014 PM 10:29
To: dev@hive.apache.org
Cc: hive-dev@hadoop.apache.org
Subject: Re: HiveServer2 : Can we perform parallel operation one same statement object in
JDBC connection ?

Based on my past experience, the answer is "no". You may reuse the statement object sequentially,
but you cannot do so in a concurrent manner.

--Xuefu


On Wed, Apr 2, 2014 at 6:42 AM, surendra lilhore < surendra.lilhore@huawei.com> wrote:

> Hi all,
>
>                 I am deleting all table using this code in 
> HiveServer2, but after deleting all the table hive sever is throwing 
> "Invalid OperationHandle" exception.
>
>                 ResultSet resultSet = stmt.executeQuery("show tables");
>        while (resultSet.next()) {
>               stmt.execute("drop table " + resultSet.getString(1));
>        }
>
>                 Same code is working with HiveServer.
>
>                 In checked code.
>
>        HiveServer2 will create new operation handler for "show tables"
>  query,
>       If I execute "drop table" on same statement object then
> HiveStatement.execute() will close old operation handler and then it 
> will get new handler, but HiveQueryResultSet will contain old handler 
> only, again when
> resultSet.next() fetch new rows from server that time server will 
> throw this exception.
>
>
>     2014-04-02 17:58:18,911 WARN  thrift.ThriftCLIService
> (ThriftCLIService.java:FetchResults(394)) - Error getting result set
> metadata:
>    org.apache.hive.service.cli.HiveSQLException: Invalid OperationHandle:
> OperationHandle [opType=EXECUTE_STATEMENT,
> getHandleIdentifier()=5edd24f8-3147-4428-9687- bab20db19773]
>        at
> org.apache.hive.service.cli.operation.OperationManager.getOperation(Op
> erationManager.java:129)
>
>                 Can we perform parallel operation one same statement 
> object in JDBC connection ?
>
> Thanks & Regards
> Surendra
>

Mime
View raw message