public abstract class JobClientActor extends FlinkUntypedActor implements LeaderRetrievalListener
| Modifier and Type | Field and Description |
|---|---|
protected akka.actor.ActorRef |
client
The client which the actor is responsible for
|
protected akka.actor.ActorRef |
jobManager
ActorRef to the current leader
|
protected UUID |
leaderSessionID
leader session ID of the JobManager when this actor was created
|
protected scala.concurrent.duration.FiniteDuration |
timeout
timeout for futures
|
LOG| Constructor and Description |
|---|
JobClientActor(LeaderRetrievalService leaderRetrievalService,
scala.concurrent.duration.FiniteDuration timeout,
boolean sysoutUpdates) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
connectedToJobManager()
Hook to be called once a connection has been established with the JobManager.
|
protected abstract Class |
getClientMessageClass()
Hook to let the client know about messages that should start a timer for a timeout
|
protected UUID |
getLeaderSessionID()
Returns the current leader session ID associated with this actor.
|
protected abstract void |
handleCustomMessage(Object message)
Hook to handle custom client message which are not handled by the base class.
|
void |
handleError(Exception exception)
This method is called by the
LeaderRetrievalService in case of an exception. |
protected void |
handleMessage(Object message)
This method contains the actor logic which defines how to react to incoming messages.
|
protected boolean |
isClientConnected() |
protected void |
logAndPrintMessage(String message) |
void |
notifyLeaderAddress(String leaderAddress,
UUID leaderSessionID)
This method is called by the
LeaderRetrievalService when a new leader is elected. |
void |
postStop() |
void |
preStart() |
protected void |
terminate() |
decorateMessage, onReceiveakka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, getContext, getSelf, getSender, postRestart, preRestart, receive, self, sender, supervisorStrategy, unhandledprotected final scala.concurrent.duration.FiniteDuration timeout
protected akka.actor.ActorRef jobManager
protected UUID leaderSessionID
protected akka.actor.ActorRef client
public JobClientActor(LeaderRetrievalService leaderRetrievalService, scala.concurrent.duration.FiniteDuration timeout, boolean sysoutUpdates)
public void preStart()
preStart in interface akka.actor.ActorpreStart in class akka.actor.UntypedActorpublic void postStop()
postStop in interface akka.actor.ActorpostStop in class akka.actor.UntypedActorprotected abstract void connectedToJobManager()
protected abstract void handleCustomMessage(Object message)
message - The message to be handledprotected abstract Class getClientMessageClass()
protected void handleMessage(Object message)
FlinkUntypedActorhandleMessage in class FlinkUntypedActormessage - Incoming messageprotected UUID getLeaderSessionID()
FlinkUntypedActorgetLeaderSessionID in class FlinkUntypedActorprotected void logAndPrintMessage(String message)
public void notifyLeaderAddress(String leaderAddress, UUID leaderSessionID)
LeaderRetrievalListenerLeaderRetrievalService when a new leader is elected.notifyLeaderAddress in interface LeaderRetrievalListenerleaderAddress - The address of the new leaderleaderSessionID - The new leader session IDpublic void handleError(Exception exception)
LeaderRetrievalListenerLeaderRetrievalService in case of an exception. This
assures that the LeaderRetrievalListener is aware of any problems occurring in the
LeaderRetrievalService thread.handleError in interface LeaderRetrievalListenerprotected void terminate()
protected boolean isClientConnected()
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.