hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hive/Locking" by NamitJain
Date Wed, 05 May 2010 22:12:35 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hive/Locking" page has been changed by NamitJain.
http://wiki.apache.org/hadoop/Hive/Locking?action=diff&rev1=23&rev2=24

--------------------------------------------------

  ||'''X''' ||''' ''' ||'''False''' ||'''False''' ||
  
  For some operations, locks are hierarchical in nature - for eg. for some partition operations,
the table
- is also locked (for eg. to make sure that the table cannot be dropped while a new partition
is being created)
+ is also locked (for eg. to make sure that the table cannot be dropped while a new partition
is being created).
  
  The rational behind the lock mode to acquire is as follows:
  
@@ -35, +35 @@

  only applicable	to the newer partitions, a 'S' lock is acquired	on the table, whereas if
the
  change is applicable to	all partitions,	a 'X' lock is acquired on the table. Thus, older
  partitions can be read and written into, while the newer partitions are	being converted
to
- RCFile.
+ RCFile. Whenever a partition is being locked in any mode, all its parents are locked in
'S' mode.
  
  Based on this, the lock	acquired for an	operation is as	follows:
  
@@ -43, +43 @@

  ||'''Hive Command''' ||'''Locks Acquired''' ||
  ||'''select .. T1 partition P1''' ||'''S on T1, T1.P1''' ||
  ||'''insert into T2(partition P2) select .. T1 partition P1''' ||'''S on T2, T1, T1.P1 and
X on T2.P2''' ||
+ ||'''insert into T2(partition P.Q) select .. T1 partition P1''' ||'''S on T2, T2.P, T1,
T1.P1 and X on T2.P.Q''' ||
  ||'''alter table T1 rename T2'''||'''X on T1'''||
  ||'''alter table T1 add cols'''||'''X on T1'''||
  ||'''alter table T1 replace cols'''||'''X on T1'''||

Mime
View raw message