private CassandraClientPool clientPool() { return cassandraKeyValueService.getClientPool(); }
public static TimestampBoundStore create(CassandraKeyValueService kvs, boolean initializeAsync) { CassandraTimestampBoundStore store = new CassandraTimestampBoundStore(kvs.getClientPool(), kvs); store.wrapper.initialize(initializeAsync); return store.wrapper.isInitialized() ? store : store.wrapper; }
private String getUniqueReachableSchemaVersionOrThrow() throws TException { Map<String, List<String>> schemaVersions = getTestKvs().getClientPool().runWithRetry( CassandraClient::describe_schema_versions); return Iterables.getOnlyElement( schemaVersions.keySet().stream() .filter(schema -> !schema.equals(CassandraKeyValueServices.VERSION_UNREACHABLE)) .collect(Collectors.toList())); } }
private void assertThatGcGraceSecondsIs(CassandraKeyValueService kvs, int gcGraceSeconds) throws TException { List<CfDef> knownCfs = kvs.getClientPool().runWithRetry(client -> client.describe_keyspace(CASSANDRA.getConfig().getKeyspaceOrThrow()).getCf_defs()); CfDef clusterSideCf = Iterables.getOnlyElement(knownCfs.stream() .filter(cf -> cf.getName().equals(getInternalTestTableName())) .collect(Collectors.toList())); assertThat(clusterSideCf.gc_grace_seconds, equalTo(gcGraceSeconds)); }
private CassandraClientPool clientPool() { return cassandraKeyValueService.getClientPool(); }
public static TimestampBoundStore create(CassandraKeyValueService kvs, boolean initializeAsync) { CassandraTimestampBoundStore store = new CassandraTimestampBoundStore(kvs.getClientPool(), kvs); store.wrapper.initialize(initializeAsync); return store.wrapper.isInitialized() ? store : store.wrapper; }