@InterfaceAudience.Private @InterfaceStability.Evolving public class MasterProcedureQueue extends Object implements ProcedureRunnableSet
| Constructor and Description |
|---|
MasterProcedureQueue(org.apache.hadoop.conf.Configuration conf,
TableLockManager lockManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBack(Procedure proc) |
void |
addFront(Procedure proc) |
void |
clear() |
void |
completionCleanup(Procedure proc) |
protected boolean |
markTableAsDeleted(TableName table)
Tries to remove the queue and the table-lock of the specified table.
|
Long |
poll() |
void |
releaseTableRead(TableName table)
Release the read lock taken with tryAcquireTableRead()
|
void |
releaseTableWrite(TableName table)
Release the write lock taken with tryAcquireTableWrite()
|
void |
signalAll() |
int |
size() |
String |
toString() |
boolean |
tryAcquireTableRead(TableName table,
String purpose)
Try to acquire the read lock on the specified table.
|
boolean |
tryAcquireTableWrite(TableName table,
String purpose)
Try to acquire the write lock on the specified table.
|
void |
yield(Procedure proc) |
public MasterProcedureQueue(org.apache.hadoop.conf.Configuration conf,
TableLockManager lockManager)
public void addFront(Procedure proc)
addFront in interface ProcedureRunnableSetpublic void addBack(Procedure proc)
addBack in interface ProcedureRunnableSetpublic void yield(Procedure proc)
yield in interface ProcedureRunnableSetpublic Long poll()
poll in interface ProcedureRunnableSetpublic void signalAll()
signalAll in interface ProcedureRunnableSetpublic void clear()
clear in interface ProcedureRunnableSetpublic int size()
size in interface ProcedureRunnableSetpublic void completionCleanup(Procedure proc)
completionCleanup in interface ProcedureRunnableSetpublic boolean tryAcquireTableRead(TableName table, String purpose)
table - Table to lockpurpose - Human readable reason for locking the tablepublic void releaseTableRead(TableName table)
table - the name of the table that has the read lockpublic boolean tryAcquireTableWrite(TableName table, String purpose)
table - Table to lockpurpose - Human readable reason for locking the tablepublic void releaseTableWrite(TableName table)
table - the name of the table that has the write lockprotected boolean markTableAsDeleted(TableName table)
table - the name of the table that should be marked as deletedCopyright © 2015 The Apache Software Foundation. All Rights Reserved.