Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
HIVE-19924 add capacity for replication job set a query tag and kill the replication distcp job with the tag. Here I make it more general, user can set arbitrary "hive.query.tag" in sql script, and kill query with the tag. Hive will cancel the corresponding operation in hs2, along with Tez/MR application launched for the query. For example:
set hive.query.tag=mytag;
select ..... -- long running query
In another session:
kill query 'mytag';
There're limitations in the implementation:
1. No tag duplication check. There's nothing to prevent conflicting tag for same user, and kill query will kill queries share the same tag. However, kill query will not kill queries from different user unless admin. So different user might share the same tag
2. In multiple hs2 environment, kill statement should be issued to all hs2 to make sure the corresponding operation is canceled. When beeline/jdbc connects to hs2 using regular way (zookeeper url), the session will connect to random hs2, which might be different than the hs2 where query run on. User can use HiveConnection.getAllUrls or beeline --getUrlsFromBeelineSite (HIVE-20507) to get a list of all hs2 instances.
Attachments
Attachments
Issue Links
- blocks
-
HIVE-20550 Switch WebHCat to use beeline to submit Hive queries
- Closed
- is related to
-
OOZIE-3643 Oozie should pass mapreduce.job.tags to Beeline in Hive2 action
- Open
- links to