/** * Creates a key with the same row, column family, column qualifier, column visibility, timestamp, * and delete marker as the given key. */ public Key(Key other) { set(other); }
@Override public boolean next(Key key, Value value) throws IOException { if (scannerIterator.hasNext()) { ++numKeysRead; Entry<Key,Value> entry = scannerIterator.next(); key.set(currentKey = entry.getKey()); value.set(entry.getValue().get()); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; }
private void resetVersionCount() { if (super.hasTop()) currentKey.set(getSource().getTopKey()); numVersions = 1; }
private void load() { if (hasTop()) { topKey.set(source.getTopKey()); topValue.set(source.getTopValue().get()); } } }
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(); } }
lastKey = new Key(); lastKey.set(mmfi.getTopKey());
/** * 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(); } } }
/** * Creates a key with the same row, column family, column qualifier, column visibility, timestamp, * and delete marker as the given key. */ public Key(Key other) { set(other); }
@Override public boolean next(Key key, Value value) throws IOException { if (scannerIterator.hasNext()) { ++numKeysRead; Entry<Key,Value> entry = scannerIterator.next(); key.set(currentKey = entry.getKey()); value.set(entry.getValue().get()); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; }
@Override public boolean next(Key key, Value value) throws IOException { if (scannerIterator.hasNext()) { ++numKeysRead; Map.Entry<Key,Value> entry = scannerIterator.next(); key.set(currentKey = entry.getKey()); value.set(entry.getValue().get()); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; }
@Override public boolean next(Key key, Value value) throws IOException { if (scannerIterator.hasNext()) { ++numKeysRead; Map.Entry<Key,Value> entry = scannerIterator.next(); key.set(currentKey = entry.getKey()); value.set(entry.getValue().get()); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; }
@Override public boolean next(Key key, Value value) throws IOException { if (scannerIterator.hasNext()) { ++numKeysRead; Entry<Key,Value> entry = scannerIterator.next(); key.set(currentKey = entry.getKey()); value.set(entry.getValue().get()); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; }
@Override public boolean next(Key key, Value value) { if (scannerIterator.hasNext()) { ++numKeysRead; Entry<Key,Value> entry = scannerIterator.next(); key.set(currentKey = entry.getKey()); value.set(entry.getValue().get()); if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true)); return true; } return false; }
@Override public SortedKeyValueIterator<Key, Value> deepCopy(final IteratorEnvironment env) { RowIDAggregator rowIDAggregator = new RowIDAggregator(); rowIDAggregator.topKey = this.topKey; rowIDAggregator.topValue = this.topValue; rowIDAggregator.schema = this.schema; rowIDAggregator.aggregator = this.aggregator; rowIDAggregator.elementConverter = this.elementConverter; Key newWorkKey = new Key(); newWorkKey.set(workKey); rowIDAggregator.workKey = newWorkKey; return rowIDAggregator; }
private void resetVersionCount() { if (super.hasTop()) currentKey.set(getSource().getTopKey()); numVersions = 1; }
@Override public void next() throws IOException { if (readLockKey != null) { clearReadLock(); } else { curCol.set(source.getTopKey()); source.skipColumn(curCol); findTop(); } }
private void load() { if (hasTop()) { topKey.set(source.getTopKey()); topValue.set(source.getTopValue().get()); } } }
private void skipRowColumn(SortedKeyValueIterator<Key,Value> source) 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 { PushbackIterator source = (PushbackIterator) getSource(); if (lastKeySet == true) { skipRowCol(source, lastKey); } consumeDeletes(source); if (source.hasTop() && isNtfy(source.getTopKey()) && !isDelete(source.getTopKey())) { lastKey.set(source.getTopKey()); lastKeySet = true; } else { lastKeySet = false; } }
@Override protected void consume() throws IOException { PushbackIterator source = (PushbackIterator) getSource(); if (lastKeySet == true) { skipRowCol(source, lastKey); } consumeDeletes(source); if (source.hasTop() && isNtfy(source.getTopKey()) && !isDelete(source.getTopKey())) { lastKey.set(source.getTopKey()); lastKeySet = true; } else { lastKeySet = false; } }