private static boolean attemptToCreateIfNotExists(CassandraKeyValueServiceConfig config, InetSocketAddress host) { try { return keyspaceAlreadyExists(host, config) || attemptToCreateKeyspaceOnHost(host, config); } catch (Exception exception) { log.warn("Couldn't use host {} to create keyspace." + " It returned exception \"{}\" during the attempt." + " We will retry on other nodes, so this shouldn't be a problem unless all nodes failed." + " See the debug-level log for the stack trace.", SafeArg.of("host", CassandraLogHelper.host(host)), UnsafeArg.of("exceptionMessage", exception.toString())); log.debug("Specifically, creating the keyspace failed with the following stack trace", exception); return false; } }
private static boolean attemptToCreateIfNotExists(CassandraKeyValueServiceConfig config, InetSocketAddress host) { try { return keyspaceAlreadyExists(host, config) || attemptToCreateKeyspaceOnHost(host, config); } catch (Exception exception) { log.warn("Couldn't use host {} to create keyspace." + " It returned exception \"{}\" during the attempt." + " We will retry on other nodes, so this shouldn't be a problem unless all nodes failed." + " See the debug-level log for the stack trace.", SafeArg.of("host", CassandraLogHelper.host(host)), UnsafeArg.of("exceptionMessage", exception.toString())); log.debug("Specifically, creating the keyspace failed with the following stack trace", exception); return false; } }