/** * 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); } }