use of com.palantir.atlasdb.keyvalue.cassandra.TracingQueryRunner 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();
}
use of com.palantir.atlasdb.keyvalue.cassandra.TracingQueryRunner in project atlasdb by palantir.
the class CleanCassLocksStateCommand method runWithConfig.
@VisibleForTesting
public Integer runWithConfig(CassandraKeyValueServiceConfig config) throws TException {
CassandraClientPool clientPool = CassandraClientPoolImpl.create(config);
SchemaMutationLockTables lockTables = new SchemaMutationLockTables(clientPool, config);
TracingQueryRunner tracingQueryRunner = new TracingQueryRunner(log, new TracingPrefsConfig());
CassandraSchemaLockCleaner.create(config, clientPool, lockTables, tracingQueryRunner).cleanLocksState();
printer.info("Schema mutation lock cli completed successfully.");
return 0;
}
Aggregations