@DefaultImplementation(value=org.apache.reef.vortex.driver.DefaultVortexMaster.class) public interface VortexMaster
Modifier and Type | Method and Description |
---|---|
void |
cancelTasklet(boolean mayInterruptIfRunning,
int taskletId)
Call this when a Tasklet is to be cancelled.
|
<TInput,TOutput> |
enqueueTasklet(VortexFunction<TInput,TOutput> vortexFunction,
TInput input,
Optional<FutureCallback<TOutput>> callback)
Submit a new Tasklet to be run sometime in the future, with an optional callback function on the result.
|
<TInput,TOutput> |
enqueueTasklets(VortexAggregateFunction<TOutput> aggregateFunction,
VortexFunction<TInput,TOutput> vortexFunction,
VortexAggregatePolicy policy,
List<TInput> inputs,
Optional<FutureCallback<AggregateResult<TInput,TOutput>>> callback)
Submits aggregate-able Tasklets to be run sometime in the future, with an optional callback function on
the aggregation progress.
|
void |
terminate()
Release all resources and shut down.
|
void |
workerAllocated(org.apache.reef.vortex.driver.VortexWorkerManager vortexWorkerManager)
Call this when a new worker is up and running.
|
void |
workerPreempted(String id)
Call this when a worker is preempted.
|
void |
workerReported(String workerId,
WorkerToMasterReports workerToMasterReports)
Call this when a worker has reported back.
|
<TInput,TOutput> VortexFuture<TOutput> enqueueTasklet(VortexFunction<TInput,TOutput> vortexFunction, TInput input, Optional<FutureCallback<TOutput>> callback)
<TInput,TOutput> VortexAggregateFuture<TInput,TOutput> enqueueTasklets(VortexAggregateFunction<TOutput> aggregateFunction, VortexFunction<TInput,TOutput> vortexFunction, VortexAggregatePolicy policy, List<TInput> inputs, Optional<FutureCallback<AggregateResult<TInput,TOutput>>> callback)
void cancelTasklet(boolean mayInterruptIfRunning, int taskletId)
mayInterruptIfRunning
- if true, will attempt to cancel running Tasklets; otherwise will only
prevent a pending Tasklet from running.taskletId
- the ID of the Tasklet.void workerAllocated(org.apache.reef.vortex.driver.VortexWorkerManager vortexWorkerManager)
void workerPreempted(String id)
void workerReported(String workerId, WorkerToMasterReports workerToMasterReports)
void terminate()
Copyright © 2017 The Apache Software Foundation. All rights reserved.