public interface AllocatedEvaluator extends AutoCloseable, Identifiable, ContextSubmittable, ContextAndTaskSubmittable, TaskSubmittable
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(File file)
Puts the given file into the working directory of the Evaluator.
|
void |
addLibrary(File file)
Puts the given file into the working directory of the Evaluator and adds it to its classpath.
|
void |
close()
Releases the allocated evaluator back to the resource manager.
|
EvaluatorDescriptor |
getEvaluatorDescriptor() |
void |
setProcess(EvaluatorProcess process)
Specify the process to be instantiated for the Evaluator.
|
void |
submitContext(Configuration contextConfiguration)
Submit a Context.
|
void |
submitContextAndService(Configuration contextConfiguration,
Configuration serviceConfiguration)
Submit a Context and a Service Configuration.
|
void |
submitContextAndServiceAndTask(Configuration contextConfiguration,
Configuration serviceConfiguration,
Configuration taskConfiguration)
Submit a Context with Services and a Task.
|
void |
submitContextAndTask(Configuration contextConfiguration,
Configuration taskConfiguration)
Submit a Context and a Task.
|
void |
submitTask(Configuration taskConfiguration)
Submits the given Task for execution.
|
getIdvoid addFile(File file)
file - the file to be copiedvoid addLibrary(File file)
file - the file to be copiedEvaluatorDescriptor getEvaluatorDescriptor()
void setProcess(EvaluatorProcess process)
process - void close()
close in interface AutoCloseablevoid submitTask(Configuration taskConfiguration)
This generates a ContextConfiguration for the root context with a generated ID derived from the EvaluatorId.
submitTask in interface TaskSubmittabletaskConfiguration - the Configuration. See TaskConfiguration for details.void submitContext(Configuration contextConfiguration)
ContextSubmittablesubmitContext in interface ContextSubmittablecontextConfiguration - the Configuration of the EvaluatorContext. See ContextConfiguration for details.void submitContextAndService(Configuration contextConfiguration, Configuration serviceConfiguration)
ContextSubmittablesubmitContextAndService in interface ContextSubmittablecontextConfiguration - the Configuration of the EvaluatorContext. See ContextConfiguration for details.serviceConfiguration - the Configuration for the Services. See ServiceConfiguration for details.void submitContextAndTask(Configuration contextConfiguration, Configuration taskConfiguration)
ContextAndTaskSubmittableThe semantics of this call are the same as first submitting the context and then, on the fired ActiveContext event to submit the Task. The performance of this will be better, though as it potentially saves some roundtrips on the network.
REEF will not fire an ActiveContext as a result of this. Instead, it will fire a TaskRunning event.
submitContextAndTask in interface ContextAndTaskSubmittablecontextConfiguration - the Configuration of the EvaluatorContext. See ContextConfiguration for details.taskConfiguration - the Configuration of the Task. See TaskConfiguration for details.void submitContextAndServiceAndTask(Configuration contextConfiguration, Configuration serviceConfiguration, Configuration taskConfiguration)
ContextAndTaskSubmittableThe semantics of this call are the same as first submitting the context and services and then, on the fired ActiveContext event to submit the Task. The performance of this will be better, though as it potentially saves some roundtrips on the network.
REEF will not fire an ActiveContext as a result of this. Instead, it will fire a TaskRunning event.
submitContextAndServiceAndTask in interface ContextAndTaskSubmittableCopyright © 2017 The Apache Software Foundation. All rights reserved.