/** * helper method for tests, creates the remove records per sstable */ @VisibleForTesting SSTableTidier obsoleted(SSTableReader sstable) { return obsoleted(sstable, LogRecord.make(Type.REMOVE, sstable)); }
/** * helper method for tests, creates the remove records per sstable */ @VisibleForTesting SSTableTidier obsoleted(SSTableReader sstable) { return obsoleted(sstable, LogRecord.make(Type.REMOVE, sstable)); }
static Throwable prepareForObsoletion(Iterable<SSTableReader> readers, LogTransaction txnLogs, List<LogTransaction.Obsoletion> obsoletions, Throwable accumulate) { for (SSTableReader reader : readers) { try { obsoletions.add(new LogTransaction.Obsoletion(reader, txnLogs.obsoleted(reader))); } catch (Throwable t) { accumulate = Throwables.merge(accumulate, t); } } return accumulate; }
static Throwable prepareForObsoletion(Iterable<SSTableReader> readers, LogTransaction txnLogs, List<LogTransaction.Obsoletion> obsoletions, Throwable accumulate) { Map<SSTable, LogRecord> logRecords = txnLogs.makeRemoveRecords(readers); for (SSTableReader reader : readers) { try { obsoletions.add(new LogTransaction.Obsoletion(reader, txnLogs.obsoleted(reader, logRecords.get(reader)))); } catch (Throwable t) { accumulate = Throwables.merge(accumulate, t); } } return accumulate; }
static Throwable prepareForObsoletion(Iterable<SSTableReader> readers, LogTransaction txnLogs, List<LogTransaction.Obsoletion> obsoletions, Throwable accumulate) { Map<SSTable, LogRecord> logRecords = txnLogs.makeRemoveRecords(readers); for (SSTableReader reader : readers) { try { obsoletions.add(new LogTransaction.Obsoletion(reader, txnLogs.obsoleted(reader, logRecords.get(reader)))); } catch (Throwable t) { accumulate = Throwables.merge(accumulate, t); } } return accumulate; }