Search in sources :

Example 1 with TargetedSweepInstallConfig

use of com.palantir.atlasdb.sweep.queue.config.TargetedSweepInstallConfig in project atlasdb by palantir.

the class TargetedSweeperTest method createAndInitializeSweepersAndWaitForOneBackgroundIteration.

private void createAndInitializeSweepersAndWaitForOneBackgroundIteration(int sweepers, int shards, int threads, TimelockService stickyLockService) throws InterruptedException {
    TargetedSweepRuntimeConfig runtime = ImmutableTargetedSweepRuntimeConfig.builder().shards(shards).pauseMillis(5000).build();
    TargetedSweepInstallConfig install = ImmutableTargetedSweepInstallConfig.builder().conservativeThreads(threads).thoroughThreads(0).build();
    for (int i = 0; i < sweepers; i++) {
        TargetedSweeper sweeperInstance = TargetedSweeper.createUninitialized(metricsManager, () -> runtime, install, ImmutableList.of());
        sweeperInstance.initializeWithoutRunning(timestampsSupplier, stickyLockService, spiedKvs, txnService, mockFollower);
        sweeperInstance.runInBackground();
    }
    waitUntilSweepRunsOneIteration();
}
Also used : TargetedSweepRuntimeConfig(com.palantir.atlasdb.sweep.queue.config.TargetedSweepRuntimeConfig) ImmutableTargetedSweepRuntimeConfig(com.palantir.atlasdb.sweep.queue.config.ImmutableTargetedSweepRuntimeConfig) ImmutableTargetedSweepInstallConfig(com.palantir.atlasdb.sweep.queue.config.ImmutableTargetedSweepInstallConfig) TargetedSweepInstallConfig(com.palantir.atlasdb.sweep.queue.config.TargetedSweepInstallConfig)

Aggregations

ImmutableTargetedSweepInstallConfig (com.palantir.atlasdb.sweep.queue.config.ImmutableTargetedSweepInstallConfig)1 ImmutableTargetedSweepRuntimeConfig (com.palantir.atlasdb.sweep.queue.config.ImmutableTargetedSweepRuntimeConfig)1 TargetedSweepInstallConfig (com.palantir.atlasdb.sweep.queue.config.TargetedSweepInstallConfig)1 TargetedSweepRuntimeConfig (com.palantir.atlasdb.sweep.queue.config.TargetedSweepRuntimeConfig)1