/** * Called as soon as we discover (via leader election) that a JobManager lost leadership * or a different one gained leadership. * * @param leaderAddress The address (Akka URL) of the new leader. Null if there is currently no leader. * @param leaderSessionID The unique session ID marking the leadership session. */ private void newJobManagerLeaderAvailable(String leaderAddress, UUID leaderSessionID) { LOG.debug("Received new leading JobManager {}. Connecting.", leaderAddress); // disconnect from the current leader (no-op if no leader yet) jobManagerLostLeadership(); // a null leader session id means that only a leader disconnect // happened, without a new leader yet if (leaderSessionID != null && leaderAddress != null) { // the leaderSessionID implicitly filters out success and failure messages // that come after leadership changed again this.leaderSessionID = leaderSessionID; triggerConnectingToJobManager(leaderAddress); } }
/** * Called as soon as we discover (via leader election) that a JobManager lost leadership * or a different one gained leadership. * * @param leaderAddress The address (Akka URL) of the new leader. Null if there is currently no leader. * @param leaderSessionID The unique session ID marking the leadership session. */ private void newJobManagerLeaderAvailable(String leaderAddress, UUID leaderSessionID) { LOG.debug("Received new leading JobManager {}. Connecting.", leaderAddress); // disconnect from the current leader (no-op if no leader yet) jobManagerLostLeadership(); // a null leader session id means that only a leader disconnect // happened, without a new leader yet if (leaderSessionID != null && leaderAddress != null) { // the leaderSessionID implicitly filters out success and failure messages // that come after leadership changed again this.leaderSessionID = leaderSessionID; triggerConnectingToJobManager(leaderAddress); } }
/** * Called as soon as we discover (via leader election) that a JobManager lost leadership * or a different one gained leadership. * * @param leaderAddress The address (Akka URL) of the new leader. Null if there is currently no leader. * @param leaderSessionID The unique session ID marking the leadership session. */ private void newJobManagerLeaderAvailable(String leaderAddress, UUID leaderSessionID) { LOG.debug("Received new leading JobManager {}. Connecting.", leaderAddress); // disconnect from the current leader (no-op if no leader yet) jobManagerLostLeadership(); // a null leader session id means that only a leader disconnect // happened, without a new leader yet if (leaderSessionID != null && leaderAddress != null) { // the leaderSessionID implicitly filters out success and failure messages // that come after leadership changed again this.leaderSessionID = leaderSessionID; triggerConnectingToJobManager(leaderAddress); } }
/** * Called as soon as we discover (via leader election) that a JobManager lost leadership * or a different one gained leadership. * * @param leaderAddress The address (Akka URL) of the new leader. Null if there is currently no leader. * @param leaderSessionID The unique session ID marking the leadership session. */ private void newJobManagerLeaderAvailable(String leaderAddress, UUID leaderSessionID) { LOG.debug("Received new leading JobManager {}. Connecting.", leaderAddress); // disconnect from the current leader (no-op if no leader yet) jobManagerLostLeadership(); // a null leader session id means that only a leader disconnect // happened, without a new leader yet if (leaderSessionID != null && leaderAddress != null) { // the leaderSessionID implicitly filters out success and failure messages // that come after leadership changed again this.leaderSessionID = leaderSessionID; triggerConnectingToJobManager(leaderAddress); } }
@Override protected void triggerConnectingToJobManager(String leaderAddress) { ActorSelection jobManagerSel = context().actorSelection(leaderAddress); // check if we are at the leading JobManager. if (jobManagerSel.anchorPath().root().equals(self().path().root())) { super.triggerConnectingToJobManager(leaderAddress); } else { LOG.info("Received leader address but not running in leader ActorSystem. Cancelling registration."); } }
@Override protected void triggerConnectingToJobManager(String leaderAddress) { ActorSelection jobManagerSel = context().actorSelection(leaderAddress); // check if we are at the leading JobManager. if (jobManagerSel.anchorPath().root().equals(self().path().root())) { super.triggerConnectingToJobManager(leaderAddress); } else { LOG.info("Received leader address but not running in leader ActorSystem. Cancelling registration."); } }
@Override protected void triggerConnectingToJobManager(String leaderAddress) { ActorSelection jobManagerSel = context().actorSelection(leaderAddress); // check if we are at the leading JobManager. if (jobManagerSel.anchorPath().root().equals(self().path().root())) { super.triggerConnectingToJobManager(leaderAddress); } else { LOG.info("Received leader address but not running in leader ActorSystem. Cancelling registration."); } }
@Override protected void triggerConnectingToJobManager(String leaderAddress) { ActorSelection jobManagerSel = context().actorSelection(leaderAddress); // check if we are at the leading JobManager. if (jobManagerSel.anchorPath().root().equals(self().path().root())) { super.triggerConnectingToJobManager(leaderAddress); } else { LOG.info("Received leader address but not running in leader ActorSystem. Cancelling registration."); } }
triggerConnectingToJobManager(msg.jobManagerAddress());
triggerConnectingToJobManager(msg.jobManagerAddress());
triggerConnectingToJobManager(msg.jobManagerAddress());
triggerConnectingToJobManager(msg.jobManagerAddress());