public void waitForSchema(int delay) { // first sleep the delay to make sure we see all our peers for (int i = 0; i < delay; i += 1000) { // if we see schema, we can proceed to the next check directly if (!Schema.instance.getVersion().equals(SchemaConstants.emptyVersion)) { logger.debug("got schema: {}", Schema.instance.getVersion()); break; } Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); } // if our schema hasn't matched yet, wait until it has // we do this by waiting for all in-flight migration requests and responses to complete // (post CASSANDRA-1391 we don't expect this to be necessary very often, but it doesn't hurt to be careful) if (!MigrationManager.isReadyForBootstrap()) { setMode(Mode.JOINING, "waiting for schema information to complete", true); MigrationManager.waitUntilReadyForBootstrap(); } }
public void waitForSchema(int delay) { // first sleep the delay to make sure we see all our peers for (int i = 0; i < delay; i += 1000) { // if we see schema, we can proceed to the next check directly if (!Schema.instance.getVersion().equals(SchemaConstants.emptyVersion)) { logger.debug("got schema: {}", Schema.instance.getVersion()); break; } Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); } // if our schema hasn't matched yet, wait until it has // we do this by waiting for all in-flight migration requests and responses to complete // (post CASSANDRA-1391 we don't expect this to be necessary very often, but it doesn't hurt to be careful) if (!MigrationManager.isReadyForBootstrap()) { setMode(Mode.JOINING, "waiting for schema information to complete", true); MigrationManager.waitUntilReadyForBootstrap(); } }
public void waitForSchema(int delay) { // first sleep the delay to make sure we see all our peers for (int i = 0; i < delay; i += 1000) { // if we see schema, we can proceed to the next check directly if (!Schema.instance.getVersion().equals(SchemaConstants.emptyVersion)) { logger.debug("got schema: {}", Schema.instance.getVersion()); break; } Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); } // if our schema hasn't matched yet, wait until it has // we do this by waiting for all in-flight migration requests and responses to complete // (post CASSANDRA-1391 we don't expect this to be necessary very often, but it doesn't hurt to be careful) if (!MigrationManager.isReadyForBootstrap()) { setMode(Mode.JOINING, "waiting for schema information to complete", true); MigrationManager.waitUntilReadyForBootstrap(); } }
public synchronized void initClient() throws ConfigurationException { // We don't wait, because we're going to actually try to work on initClient(0); // sleep a while to allow gossip to warm up (the other nodes need to know about this one before they can reply). outer: while (true) { Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); for (InetAddress address : Gossiper.instance.getLiveMembers()) { if (!Gossiper.instance.isFatClient(address)) break outer; } } // sleep until any schema migrations have finished while (!MigrationManager.isReadyForBootstrap()) { Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); } }
while (!MigrationManager.isReadyForBootstrap())