@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { return new RowDeletingIterator(source.deepCopy(env), propogateDeletes); }
@Override public void next() throws IOException { source.next(); consumeDeleted(); consumeEmptyColFams(); }
private void consumeEmptyColFams() throws IOException { while (dropEmptyColFams && source.hasTop() && source.getTopKey().getColumnFamilyData().length() == 0) { source.next(); consumeDeleted(); } }
private void consumeDeleted() throws IOException { // this method tries to do as little work as possible when nothing is deleted while (source.hasTop()) { if (currentRowDeleted) { while (source.hasTop() && currentRow.equals(source.getTopKey().getRowData()) && source.getTopKey().getTimestamp() <= deleteTS) { source.next(); } if (source.hasTop() && !currentRow.equals(source.getTopKey().getRowData())) { currentRowDeleted = false; } } if (!currentRowDeleted && source.hasTop() && isDeleteMarker(source.getTopKey(), source.getTopValue())) { currentRow = source.getTopKey().getRowData(); currentRowDeleted = true; deleteTS = source.getTopKey().getTimestamp(); if (propogateDeletes) break; } else { break; } } }
private void consumeEmptyColFams() throws IOException { while (dropEmptyColFams && source.hasTop() && source.getTopKey().getColumnFamilyData().length() == 0) { source.next(); consumeDeleted(); } }
private void consumeDeleted() throws IOException { // this method tries to do as little work as possible when nothing is deleted while (source.hasTop()) { if (currentRowDeleted) { while (source.hasTop() && currentRow.equals(source.getTopKey().getRowData()) && source.getTopKey().getTimestamp() <= deleteTS) { source.next(); } if (source.hasTop() && !currentRow.equals(source.getTopKey().getRowData())) { currentRowDeleted = false; } } if (!currentRowDeleted && source.hasTop() && isDeleteMarker(source.getTopKey(), source.getTopValue())) { currentRow = source.getTopKey().getRowData(); currentRowDeleted = true; deleteTS = source.getTopKey().getTimestamp(); if (propogateDeletes) break; } else { break; } } }
range.isEndKeyInclusive()); source.seek(newRange, columnFamilies, inclusive); consumeDeleted(); consumeEmptyColFams(); consumeDeleted(); consumeEmptyColFams(); consumeDeleted(); consumeEmptyColFams();
@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { return new RowDeletingIterator(source.deepCopy(env), propogateDeletes); }
@Override public void next() throws IOException { source.next(); consumeDeleted(); consumeEmptyColFams(); }
range.isEndKeyInclusive()); source.seek(newRange, columnFamilies, inclusive); consumeDeleted(); consumeEmptyColFams(); consumeDeleted(); consumeEmptyColFams(); consumeDeleted(); consumeEmptyColFams();