private void leaveRing() { SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.NEEDS_BOOTSTRAP); tokenMetadata.removeEndpoint(FBUtilities.getBroadcastAddress()); PendingRangeCalculatorService.instance.update(); Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.left(getLocalTokens(),Gossiper.computeExpireTime())); int delay = Math.max(RING_DELAY, Gossiper.intervalInMillis * 2); logger.info("Announcing that I have left the ring for {}ms", delay); Uninterruptibles.sleepUninterruptibly(delay, TimeUnit.MILLISECONDS); }
private void leaveRing() { SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.NEEDS_BOOTSTRAP); tokenMetadata.removeEndpoint(FBUtilities.getBroadcastAddress()); PendingRangeCalculatorService.instance.update(); Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.left(getLocalTokens(),Gossiper.computeExpireTime())); int delay = Math.max(RING_DELAY, Gossiper.intervalInMillis * 2); logger.info("Announcing that I have left the ring for {}ms", delay); Uninterruptibles.sleepUninterruptibly(delay, TimeUnit.MILLISECONDS); }
private void finishJoiningRing(boolean didBootstrap, Collection<Token> tokens) { // start participating in the ring. setMode(Mode.JOINING, "Finish joining ring", true); SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); executePreJoinTasks(didBootstrap); setTokens(tokens); assert tokenMetadata.sortedTokens().size() > 0; doAuthSetup(); }
private void finishJoiningRing(boolean didBootstrap, Collection<Token> tokens) { // start participating in the ring. setMode(Mode.JOINING, "Finish joining ring", true); SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); executePreJoinTasks(didBootstrap); setTokens(tokens); assert tokenMetadata.sortedTokens().size() > 0; doAuthSetup(); }
private void finishJoiningRing(boolean didBootstrap, Collection<Token> tokens) { // start participating in the ring. setMode(Mode.JOINING, "Finish joining ring", true); SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); executePreJoinTasks(didBootstrap); setTokens(tokens); assert tokenMetadata.sortedTokens().size() > 0; doAuthSetup(); }
public void run() { shutdownClientServers(); Gossiper.instance.stop(); try { MessagingService.instance().shutdown(); } catch (IOError ioe) { logger.info("failed to shutdown message service: {}", ioe); } StageManager.shutdownNow(); SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.DECOMMISSIONED); setMode(Mode.DECOMMISSIONED, true); // let op be responsible for killing the process } };
public void run() { shutdownClientServers(); Gossiper.instance.stop(); try { MessagingService.instance().shutdown(); } catch (IOError ioe) { logger.info("failed to shutdown message service: {}", ioe); } StageManager.shutdownNow(); SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.DECOMMISSIONED); setMode(Mode.DECOMMISSIONED, true); // let op be responsible for killing the process } };
public void run() { shutdownClientServers(); Gossiper.instance.stop(); try { MessagingService.instance().shutdown(); } catch (IOError ioe) { logger.info("failed to shutdown message service: {}", ioe); } StageManager.shutdownNow(); SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.DECOMMISSIONED); setMode(Mode.DECOMMISSIONED, true); // let op be responsible for killing the process } };
public synchronized void joinRing() throws IOException { if (!joined) { logger.info("Joining ring by operator request"); try { joinTokenRing(0); } catch (ConfigurationException e) { throw new IOException(e.getMessage()); } } else if (isSurveyMode) { setTokens(SystemKeyspace.getSavedTokens()); SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); isSurveyMode = false; logger.info("Leaving write survey mode and joining ring at operator request"); assert tokenMetadata.sortedTokens().size() > 0; Auth.setup(); } }
private void leaveRing() { SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.NEEDS_BOOTSTRAP); tokenMetadata.removeEndpoint(FBUtilities.getBroadcastAddress()); PendingRangeCalculatorService.instance.update(); Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.left(getLocalTokens(),Gossiper.computeExpireTime())); int delay = Math.max(RING_DELAY, Gossiper.intervalInMillis * 2); logger.info("Announcing that I have left the ring for {}ms", delay); Uninterruptibles.sleepUninterruptibly(delay, TimeUnit.MILLISECONDS); }
private void leaveRing() { SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.NEEDS_BOOTSTRAP); tokenMetadata.removeEndpoint(FBUtilities.getBroadcastAddress()); PendingRangeCalculatorService.instance.update(); Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.left(getLocalTokens(),Gossiper.computeExpireTime())); int delay = Math.max(RING_DELAY, Gossiper.intervalInMillis * 2); logger.info("Announcing that I have left the ring for {}ms", delay); Uninterruptibles.sleepUninterruptibly(delay, TimeUnit.MILLISECONDS); }
logger.warn("Detected previous bootstrap failure; retrying"); else SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.IN_PROGRESS); setMode(Mode.JOINING, "waiting for ring information", true); waitForSchema(delay);
logger.warn("Detected previous bootstrap failure; retrying"); else SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.IN_PROGRESS); setMode(Mode.JOINING, "waiting for ring information", true); SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED); setTokens(bootstrapTokens);
logger.warn("Detected previous bootstrap failure; retrying"); else SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.IN_PROGRESS); setMode(Mode.JOINING, "waiting for ring information", true); waitForSchema(delay);
logger.warn("Detected previous bootstrap failure; retrying"); else SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.IN_PROGRESS); setMode(Mode.JOINING, "waiting for ring information", true); waitForSchema(delay);
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);
SystemKeyspace.setBootstrapState(SystemKeyspace.BootstrapState.COMPLETED);