@Override public void seek( final Range range, final Collection<ByteSequence> columnFamilies, final boolean inclusive) throws IOException { source.seek(range, columnFamilies, inclusive); findTop(); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { if (!range.isInfiniteStartKey() || !range.isInfiniteStopKey()) log.warn("Range is not infinite: " + range); source.seek(range, columnFamilies, inclusive); IteratorAdapter ia = new IteratorAdapter(source); SortedMap<Key, Value> map = MemMatrixUtil.matrixToMap( new TreeMap<Key, Value>(), MemMatrixUtil.doInverse(MemMatrixUtil.buildMatrix(ia, matrixSize), numIterations)); // DebugUtil.printMapFull(map.entrySet().iterator()); mapIterator = new MapIterator(map); mapIterator.init(null, null, null); mapIterator.seek(range, columnFamilies, inclusive); }
@Override public Iterator<Entry<Key, Value>> iterator() { smi.scanner.setBatchSize(size); smi.scanner.setTimeout(timeOut, TimeUnit.MILLISECONDS); if (isolated) smi.scanner.enableIsolation(); else smi.scanner.disableIsolation(); final TreeMap<Integer, IterInfo> tm = new TreeMap<Integer, IterInfo>(); for (IterInfo iterInfo : serverSideIteratorList) { tm.put(iterInfo.getPriority(), iterInfo); } SortedKeyValueIterator<Key, Value> skvi; try { skvi = IteratorUtil.loadIterators( smi, tm.values(), serverSideIteratorOptions, new IteratorEnvironment() { @Override public SortedKeyValueIterator<Key, Value> reserveMapFileReader( final String mapFileName) throws IOException { return null; } @Override public AccumuloConfiguration getConfig() { return null; } @Override public IteratorScope getIteratorScope() { return null; } @Override public boolean isFullMajorCompaction() { return false; } @Override public void registerSideChannel(final SortedKeyValueIterator<Key, Value> iter) {} }, false, null); } catch (IOException e) { throw new RuntimeException(e); } final Set<ByteSequence> colfs = new TreeSet<ByteSequence>(); for (Column c : this.getFetchedColumns()) { colfs.add(new ArrayByteSequence(c.getColumnFamily())); } try { skvi.seek(range, colfs, true); } catch (IOException e) { throw new RuntimeException(e); } return new IteratorAdapter(skvi); }
@Override public synchronized void seek( Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { source.seek(range, columnFamilies, inclusive); }