|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.procedure.ProcedureMember
@InterfaceAudience.Private public class ProcedureMember
Process to kick off and manage a running Subprocedure
on a member. This is the
specialized part of a Procedure
that actually does procedure type-specific work
and reports back to the coordinator as it completes each phase.
Constructor Summary | |
---|---|
ProcedureMember(ProcedureMemberRpcs rpcs,
ThreadPoolExecutor pool,
SubprocedureFactory factory)
Instantiate a new ProcedureMember. |
Method Summary | |
---|---|
void |
close()
Best effort attempt to close the threadpool via Thread.interrupt. |
void |
controllerConnectionFailure(String message,
Throwable cause,
String procName)
The connection to the rest of the procedure group (member and coordinator) has been broken/lost/failed. |
Subprocedure |
createSubprocedure(String opName,
byte[] data)
This is separated from execution so that we can detect and handle the case where the subprocedure is invalid and inactionable due to bad info (like DISABLED snapshot type being sent here) |
static ThreadPoolExecutor |
defaultPool(String memberName,
int procThreads)
Default thread pool for the procedure |
static ThreadPoolExecutor |
defaultPool(String memberName,
int procThreads,
long keepAliveMillis)
Default thread pool for the procedure |
void |
receiveAbortProcedure(String procName,
ForeignException ee)
Send abort to the specified procedure |
void |
receivedReachedGlobalBarrier(String procName)
Notification that procedure coordinator has reached the global barrier |
boolean |
submitSubprocedure(Subprocedure subproc)
Submit an subprocedure for execution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProcedureMember(ProcedureMemberRpcs rpcs, ThreadPoolExecutor pool, SubprocedureFactory factory)
rpcs
- controller used to send notifications to the procedure coordinatorpool
- thread pool to submit subproceduresfactory
- class that creates instances of a subprocedure.Method Detail |
---|
public static ThreadPoolExecutor defaultPool(String memberName, int procThreads)
memberName
- procThreads
- the maximum number of threads to allow in the poolpublic static ThreadPoolExecutor defaultPool(String memberName, int procThreads, long keepAliveMillis)
memberName
- procThreads
- the maximum number of threads to allow in the poolkeepAliveMillis
- the maximum time (ms) that excess idle threads will wait for new taskspublic Subprocedure createSubprocedure(String opName, byte[] data)
opName
- data
-
public boolean submitSubprocedure(Subprocedure subproc)
subproc
- the subprocedure to execute.
public void receivedReachedGlobalBarrier(String procName)
procName
- name of the subprocedure that should start running the in-barrier phasepublic void close() throws IOException
close
in interface Closeable
IOException
public void controllerConnectionFailure(String message, Throwable cause, String procName)
message
- description of the errorcause
- the actual cause of the failureprocName
- the name of the procedure we'd cancel due to the error.public void receiveAbortProcedure(String procName, ForeignException ee)
procName
- name of the procedure to aboutee
- exception information about the abort
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |