public Iterable<SSTableReader> getUncompacting(Iterable<SSTableReader> candidates) { return view.get().getUncompacting(candidates); }
public Iterable<SSTableReader> getUncompacting(Iterable<SSTableReader> candidates) { return view.get().getUncompacting(candidates); }
public Iterable<SSTableReader> getUncompacting(Iterable<SSTableReader> candidates) { return view.get().getUncompacting(candidates); }
/** * Returns a Pair of all compacting and non-compacting sstables. Non-compacting sstables will be marked as * compacting. */ @SuppressWarnings("resource") private Pair<List<SSTableReader>, Map<UUID, LifecycleTransaction>> getCompactingAndNonCompactingSSTables() { List<SSTableReader> allCompacting = new ArrayList<>(); Map<UUID, LifecycleTransaction> allNonCompacting = new HashMap<>(); for (Keyspace ks : Keyspace.all()) { for (ColumnFamilyStore cfStore: ks.getColumnFamilyStores()) { Set<SSTableReader> nonCompacting, allSSTables; LifecycleTransaction txn = null; do { View view = cfStore.getTracker().getView(); allSSTables = ImmutableSet.copyOf(view.select(SSTableSet.CANONICAL)); nonCompacting = ImmutableSet.copyOf(view.getUncompacting(allSSTables)); } while (null == (txn = cfStore.getTracker().tryModify(nonCompacting, OperationType.UNKNOWN))); allNonCompacting.put(cfStore.metadata.cfId, txn); 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. */ @SuppressWarnings("resource") private Pair<List<SSTableReader>, Map<UUID, LifecycleTransaction>> getCompactingAndNonCompactingSSTables() { List<SSTableReader> allCompacting = new ArrayList<>(); Map<UUID, LifecycleTransaction> allNonCompacting = new HashMap<>(); for (Keyspace ks : Keyspace.all()) { for (ColumnFamilyStore cfStore: ks.getColumnFamilyStores()) { Set<SSTableReader> nonCompacting, allSSTables; LifecycleTransaction txn = null; do { View view = cfStore.getTracker().getView(); allSSTables = ImmutableSet.copyOf(view.select(SSTableSet.CANONICAL)); nonCompacting = ImmutableSet.copyOf(view.getUncompacting(allSSTables)); } while (null == (txn = cfStore.getTracker().tryModify(nonCompacting, OperationType.UNKNOWN))); allNonCompacting.put(cfStore.metadata.cfId, txn); 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. */ @SuppressWarnings("resource") private Pair<List<SSTableReader>, Map<UUID, LifecycleTransaction>> getCompactingAndNonCompactingSSTables() { List<SSTableReader> allCompacting = new ArrayList<>(); Map<UUID, LifecycleTransaction> allNonCompacting = new HashMap<>(); for (Keyspace ks : Keyspace.all()) { for (ColumnFamilyStore cfStore: ks.getColumnFamilyStores()) { Set<SSTableReader> nonCompacting, allSSTables; LifecycleTransaction txn = null; do { View view = cfStore.getTracker().getView(); allSSTables = ImmutableSet.copyOf(view.select(SSTableSet.CANONICAL)); nonCompacting = ImmutableSet.copyOf(view.getUncompacting(allSSTables)); } while (null == (txn = cfStore.getTracker().tryModify(nonCompacting, OperationType.UNKNOWN))); allNonCompacting.put(cfStore.metadata.cfId, txn); allCompacting.addAll(Sets.difference(allSSTables, nonCompacting)); } } return Pair.create(allCompacting, allNonCompacting); }