protected boolean pointInTimeExceeded(Mutation fm) { long restoreTarget = CommitLog.instance.archiver.restorePointInTime; for (ColumnFamily families : fm.getColumnFamilies()) { if (CommitLog.instance.archiver.precision.toMillis(families.maxTimestamp()) > restoreTarget) return true; } return false; } }
public List<Row> fetchSorted() throws IOException { List<Row> rows = new ArrayList<>(); List<IndexEntryCollector.IndexEntry> docsSorted = resultMapper.docs(); List<IndexEntryCollector.IndexEntry> sliceList; for (IndexEntryCollector.IndexEntry input : docsSorted) { CellName cellName = input.clusteringKey; DecoratedKey dk = input.decoratedKey; sliceList = new ArrayList<>(); sliceList.add(input); Map<CellName, ColumnFamily> fullSlice = resultMapper.fetchRangeSlice(sliceList, dk); if (!resultMapper.filter.columnFilter(dk.getKey()).maySelectPrefix(table.getComparator(), cellName.start())) { continue; } ColumnFamily data = fullSlice.get(cellName); if (data == null || resultMapper.searchSupport.deleteIfNotLatest(dk, data.maxTimestamp(), input.pkName, data)) continue; float score = input.score; ColumnFamily cleanColumnFamily = resultMapper.showScore ? scored(score, data) : data; rows.add(new Row(dk, cleanColumnFamily)); columnsCount++; if (columnsCount > limit) break; } return rows; }
private List<Row> fetchIOOptimized() throws IOException { List<Row> rows = new ArrayList<>(); TreeMultimap<DecoratedKey, IndexEntryCollector.IndexEntry> docs = resultMapper.docsByRowKey(); for (DecoratedKey dk : docs.keySet()) { NavigableSet<IndexEntryCollector.IndexEntry> entries = docs.get(dk); if (!resultMapper.filter.dataRange.contains(dk)) { if (logger.isTraceEnabled()) { logger.trace("Skipping entry {} outside of assigned scan range", dk.getToken()); } continue; } final Map<CellName, ColumnFamily> fullSlice = resultMapper.fetchPagedRangeSlice(entries, dk, limit); for (IndexEntryCollector.IndexEntry input : entries) { CellName cellName = input.clusteringKey; if (!resultMapper.filter.columnFilter(dk.getKey()).maySelectPrefix(table.getComparator(), cellName.start())) { continue; } ColumnFamily data = fullSlice.get(cellName); if (data == null || resultMapper.searchSupport.deleteIfNotLatest(dk, data.maxTimestamp(), input.pkName, data)) continue; float score = input.score; ColumnFamily cleanColumnFamily = resultMapper.showScore ? scored(score, data) : data; rows.add(new Row(dk, cleanColumnFamily)); columnsCount++; if (columnsCount > limit) break; } if (columnsCount > limit) break; } return rows; }