hive 解锁

hive存在两种锁,共享锁Shared (S)和互斥锁Exclusive (X),

 

你可以使用命令 show locks tablename;查看你的表状态

 

例子:

 

show locks  decision.changli_tmp_user_info;

unlock table decision.changli_tmp_user_info;

 

 

分区表解锁:

 

Hive Unlock All Partitions

 

 

irb> s = Date.new(2014,03,01) # The start date of the partitions
irb> e = Date.new(2014,05,01) # The end date of the partitions
irb> (s..e).each {|x| puts "unlock table your_table partition(dt='#{x}');"}
unlock table your_table partition(dt='2014-04-01');
unlock table your_table partition(dt='2014-04-02');
..
unlock table your_table partition(dt='2014-05-01');

您可以选择一种方式赞助本站