void next(Collection<SortedKeyValueIterator<Key,Value>> iterators) throws IOException { for (SortedKeyValueIterator<Key,Value> iter : iterators) { iter.next(); } } }
@Override public synchronized void next() throws IOException { source.next(); }
@Override public void next() throws IOException { source.next(); numRead++; if (numRead % 23 == 0) { readCounter.addAndGet(numRead); numRead = 0; } }
@Override public void next() throws IOException { if (!seenSeek) throw new IllegalStateException("never been seeked"); getSource().next(); }
@Override public void next() throws IOException { source.next(); consume(); }
@Override public synchronized void next() throws IOException { source.next(); findTop(); }
@Override public void next() throws IOException { // do not let user advance too far and try to avoid reexecuting hasTop() if (!hasTop && !hasTop()) throw new NoSuchElementException(); hasTop = false; source.next(); }
@Override public void next() throws IOException { source.next(); load(); }
@Override public void next() throws IOException { source.next(); findTop(); }
@Override public void next() throws IOException { if (currentPartition == null) { return; } // precondition: the current row is set up and the sources all have the same column qualifier // while we don't have a match, seek in the source with the smallest column qualifier sources[0].iter.next(); advanceToIntersection(); }
@Override public void next() throws IOException { source.next(); consumeDeleted(); consumeEmptyColFams(); }
@Override public void next() throws IOException { if (!hasTop) throw new IllegalStateException(); reader.next(); hasTop = reader.hasTop() && !range.afterEndKey(reader.getTopKey()); }
TreeMap<Key,Value> consume(SortedKeyValueIterator<Key,Value> skvi) throws IOException { TreeMap<Key,Value> data = new TreeMap<>(); while (skvi.hasTop()) { // Make sure to copy the K-V data.put(new Key(skvi.getTopKey()), new Value(skvi.getTopValue())); skvi.next(); } return data; }
@Override public void next() throws IOException { if (source.getTopKey().isDeleted()) skipRowColumn(); else source.next(); findTop(); }
/** * Iterates over the source until an acceptable key/value pair is found. */ private void findTop() throws IOException { while (source.hasTop()) { Key top = source.getTopKey(); if (top.isDeleted() || (accept(top, source.getTopValue()))) { break; } source.next(); } }
private void consumeEmptyColFams() throws IOException { while (dropEmptyColFams && source.hasTop() && source.getTopKey().getColumnFamilyData().length() == 0) { source.next(); consumeDeleted(); } }
/** * Iterates over the source until an acceptable key/value pair is found. */ private void findTop() throws IOException { while (source.hasTop()) { Key top = source.getTopKey(); if (top.isDeleted() || (accept(top, source.getTopValue()))) { break; } source.next(); } }
@Override public Entry<Key,Value> next() { try { Entry<Key,Value> result = new KeyValue(new Key(inner.getTopKey()), new Value(inner.getTopValue()).get()); inner.next(); return result; } catch (IOException ex) { throw new NoSuchElementException(); } }
@Override protected void consume() throws IOException { while (getSource().hasTop() && ((MemKey) getSource().getTopKey()).getKVCount() > kvCount) getSource().next(); }