|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.master.TableLockManager
@InterfaceAudience.Private public abstract class TableLockManager
A manager for distributed table level locks.
Nested Class Summary | |
---|---|
static class |
TableLockManager.NullTableLockManager
A null implementation |
static interface |
TableLockManager.TableLock
A distributed lock for a table. |
Field Summary | |
---|---|
static long |
DEFAULT_TABLE_LOCK_EXPIRE_TIMEOUT_MS
|
protected static long |
DEFAULT_TABLE_READ_LOCK_TIMEOUT_MS
|
protected static long |
DEFAULT_TABLE_WRITE_LOCK_TIMEOUT_MS
|
static String |
TABLE_LOCK_ENABLE
Configuration key for enabling table-level locks for schema changes |
static String |
TABLE_LOCK_EXPIRE_TIMEOUT
|
protected static String |
TABLE_READ_LOCK_TIMEOUT_MS
Configuration key for time out for trying to acquire table locks |
protected static String |
TABLE_WRITE_LOCK_TIMEOUT_MS
Configuration key for time out for trying to acquire table locks |
Constructor Summary | |
---|---|
TableLockManager()
|
Method Summary | |
---|---|
static TableLockManager |
createTableLockManager(org.apache.hadoop.conf.Configuration conf,
ZooKeeperWatcher zkWatcher,
ServerName serverName)
Creates and returns a TableLockManager according to the configuration |
static org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.TableLock |
fromBytes(byte[] bytes)
Public for hbck |
abstract TableLockManager.TableLock |
readLock(TableName tableName,
String purpose)
Returns a TableLock for locking the table for shared access among read-lock holders |
abstract void |
reapAllExpiredLocks()
Force releases all table locks(read and write) that have been held longer than "hbase.table.lock.expire.ms". |
abstract void |
reapWriteLocks()
Force releases table write locks and lock attempts even if this thread does not own the lock. |
abstract void |
tableDeleted(TableName tableName)
Called after a table has been deleted, and after the table lock is released. |
abstract void |
visitAllLocks(InterProcessLock.MetadataHandler handler)
Visits all table locks(read and write), and lock attempts with the given callback MetadataHandler. |
abstract TableLockManager.TableLock |
writeLock(TableName tableName,
String purpose)
Returns a TableLock for locking the table for exclusive access |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TABLE_LOCK_ENABLE
protected static final String TABLE_WRITE_LOCK_TIMEOUT_MS
protected static final String TABLE_READ_LOCK_TIMEOUT_MS
protected static final long DEFAULT_TABLE_WRITE_LOCK_TIMEOUT_MS
protected static final long DEFAULT_TABLE_READ_LOCK_TIMEOUT_MS
public static final String TABLE_LOCK_EXPIRE_TIMEOUT
public static final long DEFAULT_TABLE_LOCK_EXPIRE_TIMEOUT_MS
Constructor Detail |
---|
public TableLockManager()
Method Detail |
---|
public abstract TableLockManager.TableLock writeLock(TableName tableName, String purpose)
tableName
- Table to lockpurpose
- Human readable reason for locking the table
public abstract TableLockManager.TableLock readLock(TableName tableName, String purpose)
tableName
- Table to lockpurpose
- Human readable reason for locking the table
public abstract void visitAllLocks(InterProcessLock.MetadataHandler handler) throws IOException
handler
- the metadata handler to call
IOException
- If there is an unrecoverable errorpublic abstract void reapAllExpiredLocks() throws IOException
IOException
- If there is an unrecoverable errorpublic abstract void reapWriteLocks() throws IOException
IOException
- If there is an unrecoverable errorpublic abstract void tableDeleted(TableName tableName) throws IOException
tableName
- name of the table
IOException
- If there is an unrecoverable error releasing the lockpublic static TableLockManager createTableLockManager(org.apache.hadoop.conf.Configuration conf, ZooKeeperWatcher zkWatcher, ServerName serverName)
public static org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.TableLock fromBytes(byte[] bytes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |