@Override public void beforeShipped() throws IOException { super.beforeShipped(); deletes.beforeShipped(); }
@Override public void beforeShipped() throws IOException { super.beforeShipped(); deletes.beforeShipped(); }
@Override protected void reset() { super.reset(); // Check if we are about to enter or leave the drop deletes range. switch (dropDeletesInOutput) { case BEFORE: if (entered()) { if (left()) { // Already out of range, which means there are no rows within the range. dropDeletesInOutput = DropDeletesInOutput.AFTER; } else { dropDeletesInOutput = DropDeletesInOutput.IN; } } break; case IN: if (left()) { dropDeletesInOutput = DropDeletesInOutput.AFTER; } break; default: break; } } }
@Override // should not be called at all even (!) public void update() { this.reset(); }
@Override public MatchCode getNextRowOrNextColumn(Cell cell) { doneWithColumn(cell); if (getColumnHint() == null) { return MatchCode.SEEK_NEXT_ROW; } else { return MatchCode.SEEK_NEXT_COL; } }
public StoreScanner(ScanInfo scanInfo, ScanType scanType, List<? extends KeyValueScanner> scanners) throws IOException { this(null, SCAN_FOR_COMPACTION, scanInfo, 0, Long.MAX_VALUE, false, scanType); assert scanType != ScanType.USER_SCAN; this.matcher = CompactionScanQueryMatcher.create(scanInfo, scanType, Long.MAX_VALUE, 0L, oldestUnexpiredTS, now, null, null, null); seekAllScanner(scanInfo, scanners); }
@Override protected void reset() { deletes.reset(); }
@Override public ColumnCount getColumnHint() { if (columns != null) { if (columnIndex < columns.length) { return new ColumnCount(columns[columnIndex]); } } return null; }
@Override public void reset() { columnCell = null; resetTSAndType(); }
@Override public boolean isDone(long timestamp) { return minVersions <= 0 && isExpired(timestamp); } }
@Override public boolean isDone(long timestamp) { return minVersions <= 0 && isExpired(timestamp); }
@Override public void beforeShipped() throws IOException { super.beforeShipped(); if (curColCell != null) { this.curColCell = KeyValueUtil.toNewKeyCell(this.curColCell); } }
protected CompactionScanQueryMatcher(ScanInfo scanInfo, DeleteTracker deletes, ColumnTracker columnTracker, long readPointToUse, long oldestUnexpiredTS, long now) { super(createStartKeyFromRow(EMPTY_START_ROW, scanInfo), scanInfo, columnTracker, oldestUnexpiredTS, now); this.maxReadPointToTrackVersions = readPointToUse; this.deletes = deletes; this.keepDeletedCells = scanInfo.getKeepDeletedCells(); }
protected final void trackDelete(Cell cell) { // If keepDeletedCells is true, then we only remove cells by versions or TTL during // compaction, so we do not need to track delete here. // If keepDeletedCells is TTL and the delete marker is expired, then we can make sure that the // minVerions is larger than 0(otherwise we will just return at preCheck). So here we still // need to track the delete marker to see if it masks some cells. if (keepDeletedCells == KeepDeletedCells.FALSE || (keepDeletedCells == KeepDeletedCells.TTL && cell.getTimestamp() < oldestUnexpiredTS)) { deletes.add(cell); } }
private void seekOrSkipToNextColumn(Cell cell) throws IOException { if (!trySkipToNextColumn(cell)) { seekAsDirection(matcher.getKeyForNextColumn(cell)); } }
private void seekAllScanner(ScanInfo scanInfo, List<? extends KeyValueScanner> scanners) throws IOException { // Seek all scanners to the initial key seekScanners(scanners, matcher.getStartKey(), false, parallelSeekEnabled); addCurrentScanners(scanners); resetKVHeap(scanners, comparator); }
@Override public void reset() { super.reset(); // clear only here visibilityTagsDeleteColumns = null; visibilityTagsDeleteFamily = null; visibilityTagsDeleteFamilyVersion = null; visiblityTagsDeleteColumnVersion = null; } }
@Override protected void reset() { deletes.reset(); }