public final class EvaluatorManager extends Object implements Identifiable, AutoCloseable
A (periodic) heartbeat channel is established from EvaluatorRuntime to EvaluatorManager. The EvaluatorRuntime will (periodically) send (status) messages to the EvaluatorManager using this heartbeat channel.
A (push-based) EventHandler channel is established from EvaluatorManager to EvaluatorRuntime. The EvaluatorManager uses this to forward Driver messages, launch Tasks, and initiate control information (e.g., shutdown, suspend).
Modifier and Type | Class and Description |
---|---|
static class |
EvaluatorManager.EvaluatorDescriptorName
The Evaluator Host.
|
static class |
EvaluatorManager.EvaluatorIdentifier
The Evaluator Identifier.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
fireEvaluatorAllocatedEvent()
Fires the EvaluatorAllocatedEvent to the handlers.
|
EvaluatorDescriptor |
getEvaluatorDescriptor() |
String |
getId()
Returns an identifier of this object.
|
static String |
getJobIdentifier()
Get the id of current job/application.
|
boolean |
isClosed()
Return true if the state is DONE, FAILED, or KILLED,
and there are no messages queued or in processing.
|
void |
onEvaluatorException(EvaluatorException exception)
EvaluatorException will trigger is FailedEvaluator and state transition to FAILED.
|
void |
onEvaluatorHeartbeatMessage(RemoteMessage<EvaluatorRuntimeProtocol.EvaluatorHeartbeatProto> evaluatorHeartbeatProtoRemoteMessage)
Process an evaluator heartbeat message.
|
void |
onResourceLaunch(ResourceLaunchEvent resourceLaunchEvent) |
void |
onResourceStatusMessage(ResourceStatusEvent resourceStatusEvent)
Resource status information from the (actual) resource manager.
|
void |
sendContextControlMessage(EvaluatorRuntimeProtocol.ContextControlProto contextControlProto)
Packages the ContextControlProto in an EvaluatorControlProto and forward it to the EvaluatorRuntime.
|
void |
setProcess(EvaluatorProcess process) |
String |
toString() |
public static String getJobIdentifier()
public void fireEvaluatorAllocatedEvent()
public String getId()
Identifiable
getId
in interface Identifiable
public void setProcess(EvaluatorProcess process)
public EvaluatorDescriptor getEvaluatorDescriptor()
public void close()
close
in interface AutoCloseable
public boolean isClosed()
public void onEvaluatorException(EvaluatorException exception)
exception
- on the EvaluatorRuntimepublic void onEvaluatorHeartbeatMessage(RemoteMessage<EvaluatorRuntimeProtocol.EvaluatorHeartbeatProto> evaluatorHeartbeatProtoRemoteMessage)
public void onResourceLaunch(ResourceLaunchEvent resourceLaunchEvent)
public void sendContextControlMessage(EvaluatorRuntimeProtocol.ContextControlProto contextControlProto)
contextControlProto
- message contains context control info.public void onResourceStatusMessage(ResourceStatusEvent resourceStatusEvent)
Copyright © 2016 The Apache Software Foundation. All rights reserved.