@Override public boolean advanceNextPosition() { if (nanoStart == 0) { nanoStart = System.nanoTime(); } try { if (iterator.hasNext()) { serializer.reset(); Entry<Key, Value> row = iterator.next(); for (Entry<Key, Value> entry : WholeRowIterator.decodeRow(row.getKey(), row.getValue()).entrySet()) { bytesRead += entry.getKey().getSize() + entry.getValue().getSize(); serializer.deserialize(entry); } return true; } else { return false; } } catch (IOException e) { throw new PrestoException(IO_ERROR, "Caught IO error from serializer on read", e); } }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); cso = new CfCqSliceOpts(options); }
@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { CfCqSliceSeekingFilter o = (CfCqSliceSeekingFilter) super.deepCopy(env); o.cso = new CfCqSliceOpts(cso); return o; }
@Override public void next() throws IOException { advanceSource(getSource(), advance); findTop(); }
@Override public boolean validateOptions(Map<String,String> options) { return new CfCqSliceOpts.Describer().validateOptions(options); } }
@Override public IteratorOptions describeOptions() { return new CfCqSliceOpts.Describer().describeOptions(); }
@Override public boolean accept(Key k, Value v) { PartialKey inSlice = isKeyInSlice(k); return inSlice == PartialKey.ROW_COLFAM_COLQUAL; }
@Override public void next() throws IOException { topKey = null; topValue = null; prepKeys(); }
@Override public void seek(Range range, Collection<ByteSequence> seekColumnFamilies, boolean inclusive) throws IOException { super.seek(range, null, true); }
@Override public void next() throws IOException { topKey = null; topValue = null; prepKeys(); }
@Override public Value rowEncoder(List<Key> keys, List<Value> values) throws IOException { return encodeRow(keys, values); }
/** * A convenience method for setting the range of timestamps accepted by the timestamp filter. * * @param is * the iterator setting object to configure * @param start * the start timestamp, inclusive (yyyyMMddHHmmssz) * @param end * the end timestamp, inclusive (yyyyMMddHHmmssz) */ public static void setRange(IteratorSetting is, String start, String end) { setRange(is, start, true, end, true); }
@Override protected Text getDocID(Key key) { return parseDocID(key); }
@Override public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { return new IntersectingIterator(this, env); }
@Override public SortedMap<Key,Value> rowDecoder(Key rowKey, Value rowValue) throws IOException { return decodeRow(rowKey, rowValue); }
@Override public boolean validateOptions(Map<String,String> options) { return new CfCqSliceOpts.Describer().validateOptions(options); } }
@Override public IteratorOptions describeOptions() { return new CfCqSliceOpts.Describer().describeOptions(); }
for (Entry<Key, Value> entry : scanner) { SortedMap<Key, Value> row = WholeRowIterator.decodeRow(entry.getKey(), entry.getValue()); HashMap<String, ByteIterator> rowData; if (null != fields) {
for (Entry<Key, Value> entry : scanner) { SortedMap<Key, Value> row = WholeRowIterator.decodeRow(entry.getKey(), entry.getValue()); HashMap<String, ByteIterator> rowData; if (null != fields) {
for (Entry<Key, Value> entry : scanner) { SortedMap<Key, Value> row = WholeRowIterator.decodeRow(entry.getKey(), entry.getValue()); HashMap<String, ByteIterator> rowData; if (null != fields) {