Search in sources :

Example 1 with CassandraSchemaLockCleaner

use of com.palantir.atlasdb.keyvalue.cassandra.CassandraSchemaLockCleaner 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)1 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 Test (org.junit.Test)1