Search in sources :

Example 1 with TombstoneOption

use of org.apache.cassandra.schema.CompactionParams.TombstoneOption in project cassandra by apache.

the class StorageService method garbageCollect.

public int garbageCollect(String tombstoneOptionString, int jobs, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException {
    TombstoneOption tombstoneOption = TombstoneOption.valueOf(tombstoneOptionString);
    CompactionManager.AllSSTableOpStatus status = CompactionManager.AllSSTableOpStatus.SUCCESSFUL;
    for (ColumnFamilyStore cfs : getValidColumnFamilies(false, false, keyspaceName, columnFamilies)) {
        CompactionManager.AllSSTableOpStatus oneStatus = cfs.garbageCollect(tombstoneOption, jobs);
        if (oneStatus != CompactionManager.AllSSTableOpStatus.SUCCESSFUL)
            status = oneStatus;
    }
    return status.statusCode;
}
Also used : TombstoneOption(org.apache.cassandra.schema.CompactionParams.TombstoneOption) CompactionManager(org.apache.cassandra.db.compaction.CompactionManager)

Aggregations

CompactionManager (org.apache.cassandra.db.compaction.CompactionManager)1 TombstoneOption (org.apache.cassandra.schema.CompactionParams.TombstoneOption)1