private Pair < List < SSTableReader > , Multimap < DataTracker , SSTableReader > > getCompactingAndNonCompactingSSTables ( ) { List < SSTableReader > allCompacting = new ArrayList <> ( ) ; Multimap < DataTracker , SSTableReader > allNonCompacting = HashMultimap . create ( ) ; for ( Keyspace ks : Keyspace . all ( ) ) { for ( ColumnFamilyStore cfStore : ks . getColumnFamilyStores ( ) ) { Set < SSTableReader > nonCompacting , allSSTables ; do { allSSTables = cfStore . getDataTracker ( ) . getSSTables ( ) ; nonCompacting = Sets . newHashSet ( cfStore . getDataTracker ( ) . getUncompactingSSTables ( allSSTables ) ) ; } while ( ! ( nonCompacting . isEmpty ( ) || cfStore . getDataTracker ( ) . markCompacting ( nonCompacting ) ) ) ; allNonCompacting . putAll ( cfStore . getDataTracker ( ) , nonCompacting ) ; allCompacting . addAll ( Sets . difference ( allSSTables , nonCompacting ) ) ; } } return Pair . create ( allCompacting , allNonCompacting ) ; }
Returns a Pair of all compacting and non - compacting sstables . Non - compacting sstables will be marked as compacting .