@After public void tearDown(){ leader.shutdown("end of test"); tmpDir.delete(); }
public void run() { try { leader.lead(); } catch (InterruptedException e) { LOG.info("Leader thread interrupted", e); } catch (Exception e) { LOG.warn("Unexpected exception in leader thread", e); } finally { leader.shutdown("lead ended"); } } }
public void shutdown() { running = false; x509Util.close(); if (leader != null) { leader.shutdown("quorum Peer shutdown"); } if (follower != null) { follower.shutdown(); } shutdownServerCnxnFactory(); if(udpSocket != null) { udpSocket.close(); } try { adminServer.shutdown(); } catch (AdminServerException e) { LOG.warn("Problem stopping AdminServer", e); } if(getElectionAlg() != null){ this.interrupt(); getElectionAlg().shutdown(); } try { zkDb.close(); } catch (IOException ie) { LOG.warn("Error closing logs ", ie); } }
String msg = "zxid lower 32 bits have rolled over, forcing re-election, and therefore new epoch start"; shutdown(msg); throw new XidRolloverException(msg);
public void shutdown() { running = false; if (leader != null) { leader.shutdown("quorum Peer shutdown"); } if (follower != null) { follower.shutdown(); } cnxnFactory.shutdown(); if(udpSocket != null) { udpSocket.close(); } if(getElectionAlg() != null){ this.interrupt(); getElectionAlg().shutdown(); } try { zkDb.close(); } catch (IOException ie) { LOG.warn("Error closing logs ", ie); } }
} finally { if (leader != null) { leader.shutdown("end of test");
String msg = "zxid lower 32 bits have rolled over, forcing re-election, and therefore new epoch start"; shutdown(msg); throw new XidRolloverException(msg);
} finally { if (leader != null) { leader.shutdown("Forcing shutdown"); setLeader(null);
waitForNewLeaderAck(self.getId(), zk.getZxid()); } catch (InterruptedException e) { shutdown("Waiting for a quorum of followers, only synced with sids: [ " + getSidSetString(newLeaderProposal.ackSet) + " ]"); HashSet<Long> followerSet = new HashSet<Long>(); shutdown("Unexpected internal error"); return; shutdown("Not sufficient followers synced, only synced with sids: [ " + getSidSetString(syncedSet) + " ]");
} finally { if (leader != null) { leader.shutdown("Forcing shutdown"); setLeader(null);
leader.shutdown("end of test");
} finally { if (leader != null) { leader.shutdown("end of test");
} finally { if (leader != null) { leader.shutdown("end of test");
leader.shutdown("end of test");
public void shutdown() { running = false; if (leader != null) { leader.shutdown("quorum Peer shutdown"); } if (follower != null) { follower.shutdown(); } cnxnFactory.shutdown(); if(udpSocket != null) { udpSocket.close(); } if(getElectionAlg() != null){ getElectionAlg().shutdown(); } try { zkDb.close(); } catch (IOException ie) { LOG.warn("Error closing logs ", ie); } }
public void shutdown() { running = false; if (leader != null) { leader.shutdown("quorum Peer shutdown"); } if (follower != null) { follower.shutdown(); } cnxnFactory.shutdown(); if(udpSocket != null) { udpSocket.close(); } if(getElectionAlg() != null){ this.interrupt(); getElectionAlg().shutdown(); } try { zkDb.close(); } catch (IOException ie) { LOG.warn("Error closing logs ", ie); } }
} finally { if (leader != null) { leader.shutdown("Forcing shutdown"); setLeader(null);
} finally { if (leader != null) { leader.shutdown("Forcing shutdown"); setLeader(null);