|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.procedure.ProcedureCoordinator
@InterfaceAudience.Public @InterfaceStability.Evolving public class ProcedureCoordinator
This is the master side of a distributed complex procedure execution.
The Procedure is generic and subclassing or customization shouldn't be
necessary -- any customization should happen just in Subprocedures.
| Constructor Summary | |
|---|---|
ProcedureCoordinator(ProcedureCoordinatorRpcs rpcs,
ThreadPoolExecutor pool)
Create and start a ProcedureCoordinator. |
|
ProcedureCoordinator(ProcedureCoordinatorRpcs rpcs,
ThreadPoolExecutor pool,
long timeoutMillis,
long wakeTimeMillis)
Create and start a ProcedureCoordinator. |
|
| Method Summary | |
|---|---|
void |
abortProcedure(String procName,
ForeignException reason)
Abort the procedure with the given name |
void |
close()
Shutdown the thread pools and release rpc resources |
static ThreadPoolExecutor |
defaultPool(String coordName,
int opThreads)
Default thread pool for the procedure |
static ThreadPoolExecutor |
defaultPool(String coordName,
int opThreads,
long keepAliveMillis)
Default thread pool for the procedure |
Procedure |
getProcedure(String name)
Returns the procedure. |
Set<String> |
getProcedureNames()
|
Procedure |
startProcedure(ForeignExceptionDispatcher fed,
String procName,
byte[] procArgs,
List<String> expectedMembers)
Kick off the named procedure |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProcedureCoordinator(ProcedureCoordinatorRpcs rpcs,
ThreadPoolExecutor pool)
rpcs - pool - Used for executing procedures.
public ProcedureCoordinator(ProcedureCoordinatorRpcs rpcs,
ThreadPoolExecutor pool,
long timeoutMillis,
long wakeTimeMillis)
rpcs - pool - Used for executing procedures.timeoutMillis - | Method Detail |
|---|
public static ThreadPoolExecutor defaultPool(String coordName,
int opThreads)
coordName - opThreads - the maximum number of threads to allow in the pool
public static ThreadPoolExecutor defaultPool(String coordName,
int opThreads,
long keepAliveMillis)
coordName - opThreads - the maximum number of threads to allow in the poolkeepAliveMillis - the maximum time (ms) that excess idle threads will wait for new tasks
public void close()
throws IOException
IOException
public void abortProcedure(String procName,
ForeignException reason)
procName - name of the procedure to abortreason - serialized information about the abort
public Procedure startProcedure(ForeignExceptionDispatcher fed,
String procName,
byte[] procArgs,
List<String> expectedMembers)
throws RejectedExecutionException
procName - name of the procedure to startprocArgs - arguments for the procedureexpectedMembers - expected members to start
RejectedExecutionException - if there are no more available threads to run the procedurepublic Procedure getProcedure(String name)
name - Name of the procedure
public Set<String> getProcedureNames()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||