public class JobManagerRetriever extends Object implements LeaderRetrievalListener
WebRuntimeMonitor
to which this instance is associated will be stopped.
The job manager gateway only works if the web monitor and the job manager run in the same
actor system, because many execution graph structures are not serializable. This breaks the nice
leader retrieval abstraction and we have a special code path in case that another job manager is
leader (see HandlerRedirectUtils
. In such a
case, we get the address of the web monitor of the leading job manager and redirect to it
(instead of directly communicating with it).
Constructor and Description |
---|
JobManagerRetriever(WebMonitor webMonitor,
akka.actor.ActorSystem actorSystem,
scala.concurrent.duration.FiniteDuration lookupTimeout,
scala.concurrent.duration.FiniteDuration timeout) |
Modifier and Type | Method and Description |
---|---|
scala.Tuple2<ActorGateway,Integer> |
awaitJobManagerGatewayAndWebPort()
Awaits the leading job manager gateway and its web monitor port.
|
scala.Option<scala.Tuple2<ActorGateway,Integer>> |
getJobManagerGatewayAndWebPort()
Returns the currently known leading job manager gateway and its web monitor port.
|
void |
handleError(Exception exception)
This method is called by the
LeaderRetrievalService in case of an exception. |
void |
notifyLeaderAddress(String leaderAddress,
UUID leaderSessionID)
This method is called by the
LeaderRetrievalService when a new leader is elected. |
public JobManagerRetriever(WebMonitor webMonitor, akka.actor.ActorSystem actorSystem, scala.concurrent.duration.FiniteDuration lookupTimeout, scala.concurrent.duration.FiniteDuration timeout)
public scala.Option<scala.Tuple2<ActorGateway,Integer>> getJobManagerGatewayAndWebPort() throws Exception
Exception
public scala.Tuple2<ActorGateway,Integer> awaitJobManagerGatewayAndWebPort() throws Exception
Exception
public void notifyLeaderAddress(String leaderAddress, UUID leaderSessionID)
LeaderRetrievalListener
LeaderRetrievalService
when a new leader is elected.notifyLeaderAddress
in interface LeaderRetrievalListener
leaderAddress
- The address of the new leaderleaderSessionID
- The new leader session IDpublic void handleError(Exception exception)
LeaderRetrievalListener
LeaderRetrievalService
in case of an exception. This
assures that the LeaderRetrievalListener
is aware of any problems occurring in the
LeaderRetrievalService
thread.handleError
in interface LeaderRetrievalListener
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.