delayJoiningUntilNanotime = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(1000); elector.quitElection(true); quitElectionOnBadState = true; serviceStateMismatchCount = 0;
LOG.info("Ensuring that " + localTarget + " does not " + "participate in active master election"); elector.quitElection(false); serviceState = HAServiceState.INITIALIZING; break; LOG.info("Quitting master election for " + localTarget + " and marking that fencing is necessary"); elector.quitElection(true); serviceState = HAServiceState.INITIALIZING; break;
elector.quitElection(needFence); serviceState = HAServiceState.INITIALIZING;
rpcServer.stopAndJoin(); elector.quitElection(true); healthMonitor.shutdown(); healthMonitor.join();
@Override public void rejoinElection() { elector.quitElection(false); elector.joinElection(localActiveNodeInfo); }
public void resetLeaderElection() { elector.quitElection(false); elector.joinElection(localActiveNodeInfo); }
public void resetLeaderElection() { elector.quitElection(false); elector.joinElection(localActiveNodeInfo); }
void foregoActive(int sleepTime) { if (elector != null) { elector.quitElection(false); } transitionToStandby(); if (sleepTime > 0) { try { Thread.sleep(sleepTime); } catch (InterruptedException e) { LOG.error("Interrupted while waiting to rejoin election"); } } if (elector != null) { elector.joinElection(localNodeBytes); } }
delayJoiningUntilNanotime = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(1000); elector.quitElection(true); quitElectionOnBadState = true; serviceStateMismatchCount = 0;
delayJoiningUntilNanotime = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(1000); elector.quitElection(true); quitElectionOnBadState = true; serviceStateMismatchCount = 0;
delayJoiningUntilNanotime = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(1000); elector.quitElection(true); quitElectionOnBadState = true; serviceStateMismatchCount = 0;
@Override protected void serviceStop() throws Exception { /** * When error occurs in serviceInit(), serviceStop() can be called. * We need null check for the case. */ if (elector != null) { elector.quitElection(false); elector.terminateConnection(); } super.serviceStop(); }
@Override protected void serviceStop() throws Exception { /** * When error occurs in serviceInit(), serviceStop() can be called. * We need null check for the case. */ if (elector != null) { elector.quitElection(false); elector.terminateConnection(); } super.serviceStop(); }
@Override protected void serviceStop() throws Exception { /** * When error occurs in serviceInit(), serviceStop() can be called. * We need null check for the case. */ if (elector != null) { elector.quitElection(false); elector.terminateConnection(); } super.serviceStop(); }
@Override public void stop() { if (elector != null) { elector.quitElection(false); elector.terminateConnection(); } transitionToStandby(); }
elector.quitElection(needFence); serviceState = HAServiceState.INITIALIZING;
elector.quitElection(needFence); serviceState = HAServiceState.INITIALIZING;
electors[1].quitElection(false); electors[0].quitElection(false);
elector.quitElection(false); ActiveStandbyElectorTestUtil.waitForActiveLockData(null, zks, PARENT_DIR, null);
elector.quitElection(false); ActiveStandbyElectorTestUtil.waitForActiveLockData(null, zks, PARENT_DIR, null);