Class LockManager.MasterLock

java.lang.Object
org.apache.hadoop.hbase.master.locking.LockManager.MasterLock
Enclosing class:
LockManager

public class LockManager.MasterLock extends Object
Locks on namespace/table/regions. Underneath, uses procedure framework and queues a LockProcedure which waits in a queue until scheduled. Use this lock instead LockManager.remoteLocks() for MASTER ONLY operations for two advantages: - no need of polling on LockProcedure to check if lock was acquired. - Generous timeout for lock preemption (default 10 min), no need to spawn thread for heartbeats. (timeout configuration LockProcedure.DEFAULT_LOCAL_MASTER_LOCKS_TIMEOUT_MS).