|
||||||||||
| 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 | |
|---|---|
protected static int |
DEFAULT_TABLE_READ_LOCK_TIMEOUT_MS
|
protected static int |
DEFAULT_TABLE_WRITE_LOCK_TIMEOUT_MS
|
static String |
TABLE_LOCK_ENABLE
Configuration key for enabling table-level locks for schema changes |
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 |
abstract TableLockManager.TableLock |
readLock(byte[] tableName,
String purpose)
Returns a TableLock for locking the table for shared access among read-lock holders |
abstract void |
reapAllTableWriteLocks()
Force releases all table write locks and lock attempts even if this thread does not own the lock. |
abstract void |
tableDeleted(byte[] tableName)
Called after a table has been deleted, and after the table lock is released. |
abstract TableLockManager.TableLock |
writeLock(byte[] 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 int DEFAULT_TABLE_WRITE_LOCK_TIMEOUT_MS
protected static final int DEFAULT_TABLE_READ_LOCK_TIMEOUT_MS
| Constructor Detail |
|---|
public TableLockManager()
| Method Detail |
|---|
public abstract TableLockManager.TableLock writeLock(byte[] tableName,
String purpose)
tableName - Table to lockpurpose - Human readable reason for locking the table
public abstract TableLockManager.TableLock readLock(byte[] tableName,
String purpose)
tableName - Table to lockpurpose - Human readable reason for locking the table
public abstract void reapAllTableWriteLocks()
throws IOException
IOException
public abstract void tableDeleted(byte[] tableName)
throws IOException
tableName - name of the table
IOException - If there is an unrecoverable error releasing the lock
public static TableLockManager createTableLockManager(org.apache.hadoop.conf.Configuration conf,
ZooKeeperWatcher zkWatcher,
ServerName serverName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||