Search in sources :

Example 1 with ImmutableCassandraKeyValueServiceConfig

use of com.palantir.atlasdb.cassandra.ImmutableCassandraKeyValueServiceConfig in project atlasdb by palantir.

the class CassandraKeyValueServiceTableCreationIntegrationTest method setUp.

@Before
public void setUp() {
    ImmutableCassandraKeyValueServiceConfig quickTimeoutConfig = ImmutableCassandraKeyValueServiceConfig.copyOf(CassandraContainer.KVS_CONFIG).withSchemaMutationTimeoutMillis(500);
    kvs = CassandraKeyValueServiceImpl.create(quickTimeoutConfig, CassandraContainer.LEADER_CONFIG);
    ImmutableCassandraKeyValueServiceConfig slowTimeoutConfig = ImmutableCassandraKeyValueServiceConfig.copyOf(CassandraContainer.KVS_CONFIG).withSchemaMutationTimeoutMillis(6 * 1000);
    slowTimeoutKvs = CassandraKeyValueServiceImpl.create(slowTimeoutConfig, CassandraContainer.LEADER_CONFIG);
    kvs.dropTable(AtlasDbConstants.TIMESTAMP_TABLE);
}
Also used : ImmutableCassandraKeyValueServiceConfig(com.palantir.atlasdb.cassandra.ImmutableCassandraKeyValueServiceConfig) Before(org.junit.Before)

Example 2 with ImmutableCassandraKeyValueServiceConfig

use of com.palantir.atlasdb.cassandra.ImmutableCassandraKeyValueServiceConfig in project atlasdb by palantir.

the class OneNodeDownTableManipulationTest method canCleanUpSchemaMutationLockTablesState.

@Test
public void canCleanUpSchemaMutationLockTablesState() throws Exception {
    ImmutableCassandraKeyValueServiceConfig config = OneNodeDownTestSuite.CONFIG;
    CassandraClientPool clientPool = OneNodeDownTestSuite.kvs.getClientPool();
    SchemaMutationLockTables lockTables = new SchemaMutationLockTables(clientPool, config);
    TracingQueryRunner queryRunner = new TracingQueryRunner(LoggerFactory.getLogger(TracingQueryRunner.class), new TracingPrefsConfig());
    CassandraSchemaLockCleaner cleaner = CassandraSchemaLockCleaner.create(config, clientPool, lockTables, queryRunner);
    cleaner.cleanLocksState();
}
Also used : TracingQueryRunner(com.palantir.atlasdb.keyvalue.cassandra.TracingQueryRunner) CassandraSchemaLockCleaner(com.palantir.atlasdb.keyvalue.cassandra.CassandraSchemaLockCleaner) CassandraClientPool(com.palantir.atlasdb.keyvalue.cassandra.CassandraClientPool) TracingPrefsConfig(com.palantir.atlasdb.keyvalue.impl.TracingPrefsConfig) ImmutableCassandraKeyValueServiceConfig(com.palantir.atlasdb.cassandra.ImmutableCassandraKeyValueServiceConfig) SchemaMutationLockTables(com.palantir.atlasdb.keyvalue.cassandra.SchemaMutationLockTables) Test(org.junit.Test)

Aggregations

ImmutableCassandraKeyValueServiceConfig (com.palantir.atlasdb.cassandra.ImmutableCassandraKeyValueServiceConfig)2 CassandraClientPool (com.palantir.atlasdb.keyvalue.cassandra.CassandraClientPool)1 CassandraSchemaLockCleaner (com.palantir.atlasdb.keyvalue.cassandra.CassandraSchemaLockCleaner)1 SchemaMutationLockTables (com.palantir.atlasdb.keyvalue.cassandra.SchemaMutationLockTables)1 TracingQueryRunner (com.palantir.atlasdb.keyvalue.cassandra.TracingQueryRunner)1 TracingPrefsConfig (com.palantir.atlasdb.keyvalue.impl.TracingPrefsConfig)1 Before (org.junit.Before)1 Test (org.junit.Test)1