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=15&rev2=16 -------------------------------------------------- The recipe listed above will not work as specified, because of the hierarchical nature of locks. The 'S' lock for table T are specified as follows: - * Call create( ) to create a node with pathname "/warehouse/T/read-". This is the lock node use later in the protocol. Make sure to set ephemeral flag. + * 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 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. * Otherwise the lock is granted. The 'X' lock for table T are specified as follows: - * Call create( ) to create a node with pathname "/warehouse/T/write-". This is the lock node use later in the protocol. Make sure to set the ephemeral flag. + * 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 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. * 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.
