@Override public boolean hasTop() { return hasTop && super.hasTop(); }
@Override public boolean hasTop() { return hasTop && super.hasTop(); }
@Override public boolean hasTop() { return topKey != null || super.hasTop(); }
@Override public boolean hasTop() { return !advancedPastSeek && super.hasTop(); }
@Override public boolean hasTop() { boolean b = super.hasTop(); log.debug("{} getTopKey() --> {}", prefix, b); return b; }
@Override public void next() throws IOException { // Move on to the next entry since we returned the entry at keyPos before if (keyPos >= 0) keyPos++; // If we emptied out the transformed key map then transform the next key // set from the source. It’s possible that transformation could produce keys // that are outside of our range or are not visible to the end user, so after the // call below we might not have added any keys to the map. Keep going until // we either get some keys in the map or exhaust the source iterator. while (!hasTop() && super.hasTop()) transformKeys(); }
private void resetVersionCount() { if (super.hasTop()) currentKey.set(getSource().getTopKey()); numVersions = 1; }
/** * Sets the topKey and topValue based on the top key of the source. If the column of the source * top key is in the set of combiners, topKey will be the top key of the source and topValue will * be the result of the reduce method. Otherwise, topKey and topValue will be unchanged. (They are * always set to null before this method is called.) */ private void findTop() throws IOException { // check if aggregation is needed if (super.hasTop()) { workKey.set(super.getTopKey()); if (combineAllColumns || combiners.contains(workKey)) { if (workKey.isDeleted()) { sawDelete(); return; } topKey = workKey; Iterator<Value> viter = new ValueIterator(getSource()); topValue = reduce(topKey, viter); while (viter.hasNext()) viter.next(); } } }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { seekRange = new Range(range); seekColumnFamilies = columnFamilies; seekColumnFamiliesInclusive = inclusive; // Seek the source iterator, but use a recalculated range that ensures // we see all keys with the same "prefix." We need to do this since // transforming could change the sort order and transformed keys that // are before the range start could be inside the range after transformation. super.seek(computeReseekRange(range), untransformColumnFamilies(columnFamilies), inclusive); // Range clipping could cause us to trim out all the keys we transformed. // Keep looping until we either have some keys in the output range, or have // exhausted the source iterator. keyPos = -1; // “Clear” list so hasTop returns false to get us into the loop (transformKeys // actually clears) while (!hasTop() && super.hasTop()) { // Build up a sorted list of all keys for the same prefix. When // people ask for keys, return from this list first until it is empty // before incrementing the source iterator. transformKeys(); } }
@Override public boolean hasTop() { return !advancedPastSeek && super.hasTop(); }
@Override public void next() throws IOException { if (!super.hasTop()) { last = null; } }
@Override public boolean hasTop() { if (exceededTime) { if (null != lastKey) return true; else return false; } return super.hasTop(); }
@Override public boolean hasTop() { if (null != errorKey) return true; else { if (returned) return false; else return super.hasTop(); } }
@Override public boolean hasTop() { return (topKey != null) || super.hasTop(); }
@Override public boolean hasTop() { return null != topKey || super.hasTop(); }
@Override public boolean hasTop() { return hasTop && super.hasTop(); }
@Override public boolean hasTop() { boolean b = super.hasTop(); log.debug(prefix + " hasTop() --> " + b); return b; }
@Override public boolean hasTop() { if (bypass) return super.hasTop(); try { // try to update the queue to see if there will be more data to share checkAndUpdateTop(); } catch (IOException e) { throw new RuntimeException(e); } return topKey != null; }
private void resetVersionCount() { if (super.hasTop()) currentKey.set(getSource().getTopKey()); numVersions = 1; }