hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xuefu Zhang <xzh...@cloudera.com>
Subject Re: HiveServer2 : Can we perform parallel operation one same statement object in JDBC connection ?
Date Wed, 02 Apr 2014 16:58:55 GMT
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(OperationManager.java:129)
>
>                 Can we perform parallel operation one same statement
> object in JDBC connection ?
>
> Thanks & Regards
> Surendra
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message