You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Anant Agarwal <an...@gmail.com> on 2017/10/10 22:37:08 UTC

How to Execute Hive Query in Java asynchronously

Could not find any clear documentation on How to Execute Hive Query in Java
asynchronously. as per https://issues.apache.org/jira/browse/HIVE-4617 this
is supported in Hive. Have tried using the Hive Thrift protocol which gives
an instance of TOperationHandle which I serialize to a file and deserialize
back to read the results from resultSet, it works but I am not sure if this
is the right way and looking for a cleaner/recommended approach.

The use-case is: Issue the Hive Query asynchronously, get a Job/Query Id,
either get a call-back or poll the status using Job/Query Id, and once
query results are ready read back the results.
Thanks,
Anant Agarwal