boolean allHasTop(Collection<SortedKeyValueIterator<Key,Value>> iterators) { for (SortedKeyValueIterator<Key,Value> iter : iterators) { if (!iter.hasTop()) { return false; } } return true; }
@Override public boolean hasTop() { if (sawError) { return false; } return source.hasTop(); }
@Override public boolean hasTop() { return source.hasTop(); }
@Override public boolean hasNext() { return iter != null && iter.hasTop(); }
@Override public synchronized boolean hasTop() { return source.hasTop(); }
protected final void addSource(SortedKeyValueIterator<Key,Value> source) { if (source.hasTop()) { heap.add(source); if (topIdx != null) { heap.add(topIdx); } pullReferencesFromHeap(); } } }
@Override public boolean hasTop() { if (!seenSeek) throw new IllegalStateException("never been seeked"); return getSource().hasTop(); }
@Override public boolean hasTop() { // only have a top if the prefix matches return hasTop = source.hasTop() && source.getTopKey().equals(prefixKey, keyPrefix); }
/** * @return True if there is a valid topKey which falls into the range this TermSource's iterator * was last seeked to, false otherwise. */ boolean hasEntryForTerm() { if (!iter.hasTop()) { return false; } return currentRange.contains(iter.getTopKey()); } }
public static String stringTopKey(SortedKeyValueIterator<Key,Value> iter) { if (iter.hasTop()) return iter.getTopKey().toString(); return ""; }
@Override public void next() throws IOException { if (!hasTop) throw new IllegalStateException(); reader.next(); hasTop = reader.hasTop() && !range.afterEndKey(reader.getTopKey()); }
private void findTop() throws IOException { if (!propogateDeletes) { while (source.hasTop() && source.getTopKey().isDeleted()) { skipRowColumn(); } } }
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; }
private boolean _hasNext() { return source.hasTop() && !source.getTopKey().isDeleted() && topKey.equals(source.getTopKey(), PartialKey.ROW_COLFAM_COLQUAL_COLVIS); }
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(); } }
/** * 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 skipRowColumn() throws IOException { workKey.set(source.getTopKey()); Key keyToSkip = workKey; source.next(); while (source.hasTop() && source.getTopKey().equals(keyToSkip, PartialKey.ROW_COLFAM_COLQUAL_COLVIS)) { source.next(); } }
@Override protected void consume() throws IOException { while (getSource().hasTop() && ((MemKey) getSource().getTopKey()).getKVCount() > kvCount) getSource().next(); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { reader.seek(range, columnFamilies, inclusive); this.range = range; hasTop = reader.hasTop() && !range.afterEndKey(reader.getTopKey()); while (hasTop() && range.beforeStartKey(getTopKey())) { next(); } }