Search in sources :

Example 1 with CleanupTask

use of org.apache.cassandra.db.compaction.PendingRepairManager.CleanupTask in project cassandra by apache.

the class CompactionStrategyManager method releaseRepairData.

public CleanupSummary releaseRepairData(Collection<UUID> sessions) {
    List<CleanupTask> cleanupTasks = new ArrayList<>();
    readLock.lock();
    try {
        for (PendingRepairManager prm : Iterables.concat(pendingRepairs.getManagers(), transientRepairs.getManagers())) cleanupTasks.add(prm.releaseSessionData(sessions));
    } finally {
        readLock.unlock();
    }
    CleanupSummary summary = new CleanupSummary(cfs, Collections.emptySet(), Collections.emptySet());
    for (CleanupTask task : cleanupTasks) summary = CleanupSummary.add(summary, task.cleanup());
    return summary;
}
Also used : CleanupTask(org.apache.cassandra.db.compaction.PendingRepairManager.CleanupTask) ArrayList(java.util.ArrayList) CleanupSummary(org.apache.cassandra.repair.consistent.admin.CleanupSummary)

Aggregations

ArrayList (java.util.ArrayList)1 CleanupTask (org.apache.cassandra.db.compaction.PendingRepairManager.CleanupTask)1 CleanupSummary (org.apache.cassandra.repair.consistent.admin.CleanupSummary)1