public static boolean isReadyForBootstrap() { return ((ThreadPoolExecutor) StageManager.getStage(Stage.MIGRATION)).getActiveCount() == 0; }
public void run() { shutdownClientServers(); Gossiper.instance.stop(); MessagingService.instance().shutdown(); StageManager.shutdownNow(); setMode(Mode.DECOMMISSIONED, true); // let op be responsible for killing the process } };
public void stopClient() { Gossiper.instance.unregister(this); Gossiper.instance.stop(); MessagingService.instance().shutdown(); // give it a second so that task accepted before the MessagingService shutdown gets submitted to the stage (to avoid RejectedExecutionException) Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); StageManager.shutdownNow(); }
void executeMutation(final Mutation mutation) { CompletableFuture<Void> fut = CompletableFuture.runAsync(new WrappedRunnable() { protected void runMayThrow() { mutateWithCatch(mutation); } }, StageManager.getStage(Stage.TRACING)); boolean ret = pendingFutures.add(fut); if (!ret) logger.warn("Failed to insert pending future, tracing synchronization may not work"); }
public void stopClient() { Gossiper.instance.unregister(this); Gossiper.instance.stop(); MessagingService.instance().shutdown(); // give it a second so that task accepted before the MessagingService shutdown gets submitted to the stage (to avoid RejectedExecutionException) Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); StageManager.shutdownNow(); }
void executeMutation(final Mutation mutation) { CompletableFuture<Void> fut = CompletableFuture.runAsync(new WrappedRunnable() { protected void runMayThrow() { mutateWithCatch(mutation); } }, StageManager.getStage(Stage.TRACING)); boolean ret = pendingFutures.add(fut); if (!ret) logger.warn("Failed to insert pending future, tracing synchronization may not work"); }
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 } };
void executeMutation(final Mutation mutation) { CompletableFuture<Void> fut = CompletableFuture.runAsync(new WrappedRunnable() { protected void runMayThrow() { mutateWithCatch(mutation); } }, StageManager.getStage(Stage.TRACING)); boolean ret = pendingFutures.add(fut); if (!ret) logger.warn("Failed to insert pending future, tracing synchronization may not work"); }
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 doVerb(final MessageIn<Collection<Mutation>> message, int id) { logger.trace("Received schema mutation push from {}", message.from); StageManager.getStage(Stage.MIGRATION).submit(new WrappedRunnable() { public void runMayThrow() throws ConfigurationException { SchemaKeyspace.mergeSchemaAndAnnounceVersion(message.payload); } }); } }
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 apply(IMutation mutation, Iterable<InetAddress> targets, AbstractWriteResponseHandler<IMutation> responseHandler, String localDataCenter, ConsistencyLevel consistencyLevel) { StageManager.getStage(Stage.COUNTER_MUTATION) .execute(counterWriteTask(mutation, targets, responseHandler, localDataCenter)); } };
public void stopClient() { Gossiper.instance.unregister(this); Gossiper.instance.stop(); MessagingService.instance().shutdown(); // give it a second so that task accepted before the MessagingService shutdown gets submitted to the stage (to avoid RejectedExecutionException) Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); StageManager.shutdownNow(); }
public void apply(IMutation mutation, Iterable<InetAddress> targets, AbstractWriteResponseHandler<IMutation> responseHandler, String localDataCenter, ConsistencyLevel consistencyLevel) { StageManager.getStage(Stage.COUNTER_MUTATION) .execute(counterWriteTask(mutation, targets, responseHandler, localDataCenter)); } };
public void stopClient() { Gossiper.instance.unregister(this); Gossiper.instance.stop(); MessagingService.instance().shutdown(); // give it a second so that task accepted before the MessagingService shutdown gets submitted to the stage (to avoid RejectedExecutionException) Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); StageManager.shutdownNow(); }
public void doVerb(final MessageIn<Collection<Mutation>> message, int id) { logger.trace("Received schema mutation push from {}", message.from); StageManager.getStage(Stage.MIGRATION).submit(new WrappedRunnable() { public void runMayThrow() throws ConfigurationException { SchemaKeyspace.mergeSchemaAndAnnounceVersion(message.payload); } }); } }
public void doVerb(final MessageIn<Collection<Mutation>> message, int id) { logger.trace("Received schema mutation push from {}", message.from); StageManager.getStage(Stage.MIGRATION).submit(new WrappedRunnable() { public void runMayThrow() throws ConfigurationException { SchemaKeyspace.mergeSchemaAndAnnounceVersion(message.payload); } }); } }
public void doVerb(final MessageIn<Collection<Mutation>> message, int id) { logger.debug("Received schema mutation push from {}", message.from); StageManager.getStage(Stage.MIGRATION).submit(new WrappedRunnable() { public void runMayThrow() throws Exception { DefsTables.mergeSchema(message.payload); } }); } }
public void apply(IMutation mutation, Iterable<InetAddress> targets, AbstractWriteResponseHandler responseHandler, String localDataCenter, ConsistencyLevel consistencyLevel) { StageManager.getStage(Stage.COUNTER_MUTATION) .execute(counterWriteTask(mutation, targets, responseHandler, localDataCenter)); } };
public void apply(IMutation mutation, Iterable<InetAddress> targets, AbstractWriteResponseHandler<IMutation> responseHandler, String localDataCenter, ConsistencyLevel consistencyLevel) { StageManager.getStage(Stage.COUNTER_MUTATION) .execute(counterWriteTask(mutation, targets, responseHandler, localDataCenter)); } };