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()
IdentifiablegetId in interface Identifiablepublic void close()
AllocatedEvaluatorclose in interface AutoCloseableclose in interface AllocatedEvaluatorpublic void submitTask(Configuration taskConfiguration)
AllocatedEvaluatorThis generates a ContextConfiguration for the root context with a generated ID derived from the EvaluatorId.
submitTask in interface AllocatedEvaluatorsubmitTask in interface TaskSubmittabletaskConfiguration - the Configuration. See TaskConfiguration for details.public void submitTask(String evaluatorConfiguration, String taskConfiguration)
evaluatorConfiguration - taskConfiguration - public EvaluatorDescriptor getEvaluatorDescriptor()
getEvaluatorDescriptor in interface AllocatedEvaluatorpublic void submitContext(Configuration contextConfiguration)
ContextSubmittablesubmitContext in interface ContextSubmittablesubmitContext in interface AllocatedEvaluatorcontextConfiguration - 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)
ContextSubmittablesubmitContextAndService in interface ContextSubmittablesubmitContextAndService in interface AllocatedEvaluatorcontextConfiguration - 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)
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 ContextAndTaskSubmittablesubmitContextAndTask in interface AllocatedEvaluatorcontextConfiguration - 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)
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 ContextAndTaskSubmittablesubmitContextAndServiceAndTask in interface AllocatedEvaluatorpublic void submitContextAndServiceAndTask(String evaluatorConfiguration, String contextConfiguration, String serviceConfiguration, String taskConfiguration)
evaluatorConfiguration - contextConfiguration - serviceConfiguration - taskConfiguration - public void setProcess(EvaluatorProcess process)
AllocatedEvaluatorsetProcess in interface AllocatedEvaluatorpublic void addFile(File file)
AllocatedEvaluatoraddFile in interface AllocatedEvaluatorfile - the file to be copiedpublic void addLibrary(File file)
AllocatedEvaluatoraddLibrary in interface AllocatedEvaluatorfile - the file to be copiedCopyright © 2017 The Apache Software Foundation. All rights reserved.