I have hive tables which are queried through queries in a file. I had invoked an oozie workflow which invoked a hive action for mentioned file. The job did not succeed and I killed the workflow.
But the tables are still shown as locked on Hive CLI. I am looking for a command/process that will release locks from Hive tables.
To Check the locks on table (Run in Hive)-
show locks tablename extended;
To find the activity id for long running query - (You need to pass User from above query and can verify the Agent Info from first query with the application name in below query). Run outside hive
yarn application -list | grep User
To kill the activity id -
yarn application -kill activityid
if you use mysql as metastore, it will store table locks info in table HIVE_LOCKS, truncate it .
mysql> select * from HIVE_LOCKS;
Empty set (0.00 sec)
mysql>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With