Source:
static void waitForSchemaVersions( CassandraKeyValueServiceConfig config, Cassandra.Client client, String tableName, boolean allowQuorumAgreement) throws TException { long start = System.currentTimeMillis(); long sleepTime = INITIAL_SLEEP_TIME; Map<String, List<String>> versions; do { versions = client.describe_schema_versions(); if (requiredNumberNodesAgreeOnSchemaVersion(allowQuorumAgreement, config, versions)) { return; } try { Thread.sleep(sleepTime); } catch (InterruptedException e) { throw Throwables.throwUncheckedException(e); } sleepTime = Math.min(sleepTime * 2, MAX_SLEEP_TIME); } while (System.currentTimeMillis() < start + config.schemaMutationTimeoutMillis()); StringBuilder schemaVersions = new StringBuilder(); for (Entry<String, List<String>> version : versions.entrySet()) { schemaVersions = addNodeInformation(schemaVersions, String.format("%nAt schema version %s:", version.getKey()), version.getValue()); } String configNodes = addNodeInformation(new StringBuilder(), "Nodes specified in config file:", config.servers().stream().map(InetSocketAddress::getHostName).collect(Collectors.toList())) .toString(); String errorMessage = String.format("Cassandra cluster cannot come to agreement on schema versions," + " after attempting to modify table %s. %s" + " \nFind the nodes above that diverge from the majority schema. If nodes" + " have schema 'UNKNOWN', they are likely down/unresponsive" + " and examine their logs to determine the issue." + " Fixing the underlying issue and restarting Cassandra should resolve the problem." + " You can quick-check this with 'nodetool describecluster'." + " \nIf nodes are specified in the config file, but do not have a schema version," + " then they have never joined the cluster and you should verify your configuration" + " is correct. %s", tableName, schemaVersions.toString(), configNodes); throw new IllegalStateException(errorMessage); }

Target:
static void waitForSchemaVersions( CassandraKeyValueServiceConfig config, Cassandra.Client client, String tableName, boolean allowQuorumAgreement) throws TException { long start = System.currentTimeMillis(); long sleepTime = INITIAL_SLEEP_TIME; Map<String, List<String>> versions; do { versions = client.describe_schema_versions(); if (requiredNumberNodesAgreeOnSchemaVersion(allowQuorumAgreement, config, versions)) { return; } try { Thread.sleep(sleepTime); } catch (InterruptedException e) { throw Throwables.throwUncheckedException(e); } sleepTime = Math.min(sleepTime * 2, MAX_SLEEP_TIME); } while (System.currentTimeMillis() < start + config.schemaMutationTimeoutMillis()); StringBuilder schemaVersions = new StringBuilder(); for (Entry<String, List<String>> version : versions.entrySet()) { schemaVersions = addNodeInformation(schemaVersions, String.format("%nAt schema version %s:", version.getKey()), version.getValue()); } String configNodes = addNodeInformation(new StringBuilder(), "Nodes specified in config file:", config.servers().stream().map(InetSocketAddress::getHostName).collect(Collectors.toList())) .toString(); String errorMessage = String.format("Cassandra cluster cannot come to agreement on schema versions," + " after attempting to modify table %s. %s" + " \nFind the nodes above that diverge from the majority schema and examine their logs to" + " determine the issue. If nodes have schema 'UNKNOWN', they are likely down/unresponsive." + " Fixing the underlying issue and restarting Cassandra should resolve the problem." + " You can quick-check this with 'nodetool describecluster'." + " \nIf nodes are specified in the config file, but do not have a schema version listed" + " above, then they may have never joined the cluster. Verify your configuration is correct" + " and that the nodes specified in the config are up and joined the cluster. %s", tableName, schemaVersions.toString(), configNodes); throw new IllegalStateException(errorMessage); }