Hive version 0.9 and later has a bug
While inserting in a hive table Hive takes an exclusive lock. But if table is partitioned , and insert is in dynamic partition , it will take shared lock on table but if all partitions are static then hive takes exclusive lock on partitions in which data is being inserted and shared lock on table. https://issues.apache.org/jira/browse/HIVE-3509 1.What if I want to take exclusive lock on table while inserting in dynamic partition ? I tried to take explicit lock using : LOCK TABLE tablename EXCLUSIVE; But it made table to be disabled. I cannot even read from table anymore even is same session until I do unlock table tablename in another session; 2. moreover whats lock level in hive , I mean any user can remove any other users lock. that too seems buggy. Thanks Shushant