@InterfaceAudience.Private @InterfaceStability.Evolving public class ProcedureExecutor<TEnvironment> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ProcedureExecutor.ProcedureExecutorListener |
static class |
ProcedureExecutor.Testing |
| Constructor and Description |
|---|
ProcedureExecutor(org.apache.hadoop.conf.Configuration conf,
TEnvironment environment,
ProcedureStore store) |
ProcedureExecutor(org.apache.hadoop.conf.Configuration conf,
TEnvironment environment,
ProcedureStore store,
ProcedureRunnableSet runqueue) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort(long procId)
Send an abort notification the specified procedure.
|
int |
getActiveExecutorCount() |
TEnvironment |
getEnvironment() |
int |
getNumThreads() |
Procedure |
getProcedure(long procId) |
ProcedureResult |
getResult(long procId) |
Pair<ProcedureResult,Procedure> |
getResultOrProcedure(long procId) |
Map<Long,ProcedureResult> |
getResults() |
protected ProcedureRunnableSet |
getRunnableSet() |
ProcedureStore |
getStore() |
boolean |
isFinished(long procId)
Return true if the procedure is finished.
|
boolean |
isRunning() |
boolean |
isStarted(long procId)
Return true if the procedure is started.
|
void |
join() |
void |
registerListener(ProcedureExecutor.ProcedureExecutorListener listener) |
void |
removeResult(long procId)
Mark the specified completed procedure, as ready to remove.
|
void |
start(int numThreads) |
void |
stop() |
long |
submitProcedure(Procedure proc)
Add a new root-procedure to the executor.
|
boolean |
unregisterListener(ProcedureExecutor.ProcedureExecutorListener listener) |
public ProcedureExecutor(org.apache.hadoop.conf.Configuration conf,
TEnvironment environment,
ProcedureStore store)
public ProcedureExecutor(org.apache.hadoop.conf.Configuration conf,
TEnvironment environment,
ProcedureStore store,
ProcedureRunnableSet runqueue)
public void start(int numThreads)
throws IOException
IOExceptionpublic void stop()
public void join()
public boolean isRunning()
public int getNumThreads()
public int getActiveExecutorCount()
public TEnvironment getEnvironment()
public ProcedureStore getStore()
public void registerListener(ProcedureExecutor.ProcedureExecutorListener listener)
public boolean unregisterListener(ProcedureExecutor.ProcedureExecutorListener listener)
public long submitProcedure(Procedure proc)
proc - the new procedure to execute.public ProcedureResult getResult(long procId)
public boolean isFinished(long procId)
procId - the ID of the procedure to checkpublic boolean isStarted(long procId)
procId - the ID of the procedure to checkpublic void removeResult(long procId)
procId - the ID of the procedure to removepublic boolean abort(long procId)
procId - the procedure to abortpublic Map<Long,ProcedureResult> getResults()
public Procedure getProcedure(long procId)
protected ProcedureRunnableSet getRunnableSet()
public Pair<ProcedureResult,Procedure> getResultOrProcedure(long procId)
Copyright © 2015 The Apache Software Foundation. All Rights Reserved.