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 18:02:17 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.
The comment on this change is:  .
http://wiki.apache.org/hadoop/Hive/Locking?action=diff&rev1=18&rev2=19

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

  number of partitions may not be known, an exclusive lock is taken on the table, or the prefix
that 
  is known. 
  
- The lock modes are hierarchical in nature - if 'S' lock is acquired on T, implicitly 'S'
lock is acquired
+ The 'X' lock mode is hierarchical in nature - if 'X' lock is acquired on T, implicitly 'X'
lock is acquired
- on all partitions of T.
+ on all partitions of T, irrespective of whether they are referenced in the query.
  
  Two new configurable parameters will be added to decide the number of retries for the lock
and the 
  wait time between each retry. If the number of retries are really high, it can lead to a
live lock.
@@ -79, +79 @@

   * Call create( ) to create a node with pathname "/warehouse/T/read-". This is the lock
node used later in the protocol. Make sure to set ephemeral flag.
   * Call getChildren( ) on the lock node without setting the watch flag.
   * If there are a child with a pathname starting with "write-", then the lock cannot be
acquired. Delete the node created in the first step and return.
+  * For all parent znodes of T, call getChildren() without setting the watch flag.
-  * For all sub-directories of T, if there is a child with a pathname starting with "write-",
the lock cannot be acquired. Delete the node created in the first step and return.
+  ** If there is a child with a pathname starting with "write-", the lock cannot be acquired.
Delete the node created in the first step and return.
   * Otherwise the lock is granted.
  
  The 'X' lock for table T is specified as follows:
   * Call create( ) to create a node with pathname "/warehouse/T/write-". This is the lock
node used later in the protocol. Make sure to set the ephemeral flag.
   * Call getChildren( ) on the lock node without setting the watch flag.
+  * If there is a child with a pathname starting with "read-" or anther one starting with
"write-", then the lock cannot be acquired. Delete the node created in the first step and
return.
+  * For all parent znodes of T, call getChildren() without setting the watch flag.
-  * If there are a child with a pathname starting with "read-", then the lock cannot be acquired.
Delete the node created in the first step and return.
+  ** If there is a child with a pathname starting with "read-" or "write-", the lock cannot
be acquired. Delete the node created in the first step and return.
+  * For all chidlren znodes of T, call getChildren() without setting the watch flag.
-  * For all sub-directories of T, if there is a child with a pathname starting with "read-"
or "write-", the lock cannot be acquired. Delete the node created in the first step and return.
+  ** If there is a child with a pathname starting with "read-" or "write-", the lock cannot
be acquired. Delete the node created in the first step and return.
   * Otherwise the lock is granted.
  
  The proposed scheme starves the writers for readers. In case of long readers, it may lead
to starvation for writers.

Mime
View raw message