public final class AllocatedEvaluatorImpl extends Object implements AllocatedEvaluator
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() |
String |
getId()
Returns an identifier of this object.
|
void |
setProcess(EvaluatorProcess process)
Specify the process to be instantiated for the Evaluator.
|
void |
submitContext(Configuration contextConfiguration)
Submit a Context.
|
void |
submitContext(String evaluatorConfiguration,
String contextConfiguration)
Submit Context with configuration strings.
|
void |
submitContextAndService(Configuration contextConfiguration,
Configuration serviceConfiguration)
Submit a Context and a Service Configuration.
|
void |
submitContextAndService(String evaluatorConfiguration,
String contextConfiguration,
String serviceConfiguration)
Submit Context and Service with configuration strings.
|
void |
submitContextAndServiceAndTask(Configuration contextConfiguration,
Configuration serviceConfiguration,
Configuration taskConfiguration)
Submit a Context with Services and a Task.
|
void |
submitContextAndServiceAndTask(String evaluatorConfiguration,
String contextConfiguration,
String serviceConfiguration,
String taskConfiguration)
Submit Context and Service with configuration strings.
|
void |
submitContextAndTask(Configuration contextConfiguration,
Configuration taskConfiguration)
Submit a Context and a Task.
|
void |
submitContextAndTask(String evaluatorConfiguration,
String contextConfiguration,
String taskConfiguration)
Submit Context and Task with configuration strings.
|
void |
submitTask(Configuration taskConfiguration)
Submits the given Task for execution.
|
void |
submitTask(String evaluatorConfiguration,
String taskConfiguration)
Submit Task with configuration strings.
|
String |
toString() |
public String getId()
Identifiable
getId
in interface Identifiable
public void close()
AllocatedEvaluator
close
in interface AutoCloseable
close
in interface AllocatedEvaluator
public void submitTask(Configuration taskConfiguration)
AllocatedEvaluator
This generates a ContextConfiguration for the root context with a generated ID derived from the EvaluatorId.
submitTask
in interface AllocatedEvaluator
submitTask
in interface TaskSubmittable
taskConfiguration
- the Configuration. See TaskConfiguration for details.public void submitTask(String evaluatorConfiguration, String taskConfiguration)
evaluatorConfiguration
- taskConfiguration
- public EvaluatorDescriptor getEvaluatorDescriptor()
getEvaluatorDescriptor
in interface AllocatedEvaluator
public void submitContext(Configuration contextConfiguration)
ContextSubmittable
submitContext
in interface ContextSubmittable
submitContext
in interface AllocatedEvaluator
contextConfiguration
- the Configuration of the EvaluatorContext. See ContextConfiguration for details.public void submitContext(String evaluatorConfiguration, String contextConfiguration)
evaluatorConfiguration
- contextConfiguration
- public void submitContextAndService(Configuration contextConfiguration, Configuration serviceConfiguration)
ContextSubmittable
submitContextAndService
in interface ContextSubmittable
submitContextAndService
in interface AllocatedEvaluator
contextConfiguration
- the Configuration of the EvaluatorContext. See ContextConfiguration for details.serviceConfiguration
- the Configuration for the Services. See ServiceConfiguration for details.public void submitContextAndService(String evaluatorConfiguration, String contextConfiguration, String serviceConfiguration)
evaluatorConfiguration
- contextConfiguration
- serviceConfiguration
- public void submitContextAndTask(Configuration contextConfiguration, Configuration taskConfiguration)
ContextAndTaskSubmittable
The 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 ContextAndTaskSubmittable
submitContextAndTask
in interface AllocatedEvaluator
contextConfiguration
- the Configuration of the EvaluatorContext. See ContextConfiguration for details.taskConfiguration
- the Configuration of the Task. See TaskConfiguration for details.public void submitContextAndTask(String evaluatorConfiguration, String contextConfiguration, String taskConfiguration)
evaluatorConfiguration
- contextConfiguration
- taskConfiguration
- public void submitContextAndServiceAndTask(Configuration contextConfiguration, Configuration serviceConfiguration, Configuration taskConfiguration)
ContextAndTaskSubmittable
The 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 ContextAndTaskSubmittable
submitContextAndServiceAndTask
in interface AllocatedEvaluator
public void submitContextAndServiceAndTask(String evaluatorConfiguration, String contextConfiguration, String serviceConfiguration, String taskConfiguration)
evaluatorConfiguration
- contextConfiguration
- serviceConfiguration
- taskConfiguration
- public void setProcess(EvaluatorProcess process)
AllocatedEvaluator
setProcess
in interface AllocatedEvaluator
public void addFile(File file)
AllocatedEvaluator
addFile
in interface AllocatedEvaluator
file
- the file to be copiedpublic void addLibrary(File file)
AllocatedEvaluator
addLibrary
in interface AllocatedEvaluator
file
- the file to be copiedCopyright © 2017 The Apache Software Foundation. All rights reserved.