|
||||||||||
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.Public @InterfaceStability.Evolving 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.
If there is a connection error (controllerConnectionFailure(String, IOException)
), all
currently running subprocedures are notify to failed since there is no longer a way to reach any
other members or coordinators since the rpcs are down.
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,
IOException cause)
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(long wakeFrequency,
long keepAlive,
int procThreads,
String memberName)
|
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(long wakeFrequency, long keepAlive, int procThreads, String memberName)
public 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 the in-barrier phasepublic void close() throws IOException
close
in interface Closeable
IOException
public void controllerConnectionFailure(String message, IOException cause)
message
- description of the errorcause
- the actual cause of the failure
TODO i'm tempted to just remove this code completely and treat it like any other abort.
Implementation wise, if this happens it is a ZK failure which means the RS will abort.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 |