@InterfaceAudience.Private @InterfaceStability.Evolving public interface ProcedureStore
cleanup() method, the framework will call
this method periodically and the store implementation could do some clean up works in this
method.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ProcedureStore.ProcedureIterator
An Iterator over a collection of Procedure
|
static interface |
ProcedureStore.ProcedureLoader
Interface passed to the ProcedureStore.load() method to handle the store-load events.
|
static interface |
ProcedureStore.ProcedureStoreListener
Store listener interface.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
cleanup()
Will be called by the framework to give the store a chance to do some clean up works.
|
void |
delete(long procId)
The specified procId was removed from the executor,
due to completion, abort or failure.
|
void |
delete(long[] procIds,
int offset,
int count)
The specified procIds were removed from the executor,
due to completion, abort or failure.
|
void |
delete(Procedure<?> parentProc,
long[] subProcIds)
The parent procedure completed.
|
int |
getNumThreads() |
void |
insert(Procedure<?>[] procs)
Serialize a set of new procedures.
|
void |
insert(Procedure<?> proc,
Procedure<?>[] subprocs)
When a procedure is submitted to the executor insert(proc, null) will be called.
|
boolean |
isRunning() |
void |
load(ProcedureStore.ProcedureLoader loader)
Load the Procedures in the store.
|
void |
recoverLease()
Deprecated.
since 2.3.0, will be removed in 4.0.0 along with
WALProcedureStore. As now we
will store the procedure data in a master local region, and master itself will deal
with the lease recovery of the region. |
void |
registerListener(ProcedureStore.ProcedureStoreListener listener)
Add the listener to the notification list.
|
int |
setRunningProcedureCount(int count)
Set the number of procedure running.
|
void |
start(int numThreads)
Start/Open the procedure store
|
void |
stop(boolean abort)
Stop/Close the procedure store
|
boolean |
unregisterListener(ProcedureStore.ProcedureStoreListener listener)
Remove the listener from the notification list.
|
void |
update(Procedure<?> proc)
The specified procedure was executed,
and the new state should be written to the store.
|
void registerListener(ProcedureStore.ProcedureStoreListener listener)
listener - The AssignmentListener to registerboolean unregisterListener(ProcedureStore.ProcedureStoreListener listener)
listener - The AssignmentListener to unregistervoid start(int numThreads) throws IOException
numThreads - number of threads to be used by the procedure storeIOExceptionvoid stop(boolean abort)
abort - true if the stop is an abortboolean isRunning()
int getNumThreads()
int setRunningProcedureCount(int count)
count).@Deprecated void recoverLease() throws IOException
WALProcedureStore. As now we
will store the procedure data in a master local region, and master itself will deal
with the lease recovery of the region.IOExceptionvoid load(ProcedureStore.ProcedureLoader loader) throws IOException
loader - the ProcedureLoader that will handle the store-load eventsIOExceptionvoid insert(Procedure<?> proc, Procedure<?>[] subprocs)
proc - the procedure to serialize and write to the store.subprocs - the newly created child of the proc.void insert(Procedure<?>[] procs)
procs - the procedures to serialize and write to the store.void update(Procedure<?> proc)
proc - the procedure to serialize and write to the store.void delete(long procId)
procId - the ID of the procedure to remove.void delete(Procedure<?> parentProc, long[] subProcIds)
parentProc - the parent procedure to serialize and write to the store.subProcIds - the IDs of the sub-procedure to remove.void delete(long[] procIds, int offset, int count)
procIds - the IDs of the procedures to remove.offset - the array offset from where to start to deletecount - the number of IDs to deletedefault void cleanup()
stop(boolean) method above.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.