@Override public ByteBuffer next() { long startNext = sopConfig.getStatistics().getScan().beginIteration(); if (!hasNext()) { throw new NoSuchElementException(); } foundNext = false; key = scan.getKey(); value = scan.getValue(); int len = key.remaining() + value.remaining(); bytes += len; sopConfig.getStatistics().getScan().endIteration(len, startNext); return key; }
public ByteBuffer nextBB() throws IOException { long startNext = scanStat.beginIteration(); if (prefetchedKey == null) { throw new NoSuchElementException(); } currentKey = prefetchedKey; currentValue = prefetchedValue; prefetchedKey = null; prefetchedValue = null; if (scan.next()) { populateKV(startNext, true); } return currentKey; }
public ByteBuffer nextBB() throws IOException { long startNext = scanStat.beginIteration(); if (prefetchedKey == null) { throw new NoSuchElementException(); } currentKey = prefetchedKey; currentValue = prefetchedValue; prefetchedKey = null; prefetchedValue = null; if (scan.next()) { populateKV(startNext, true); } return currentKey; }
private void initIterator() throws IOException { long startNext = scanStat.beginIteration(); boolean scanSuccessful = true; if (from == null) { scanSuccessful = scan.seekTo(); } else { int compare = scan.seekTo(from); if (compare == 0 && !fromInclusive || compare > 0) { // as from in exclusive and first key is same as from, skip the first key scanSuccessful = scan.next(); } } populateKV(startNext, scanSuccessful); }
private void initIterator() throws IOException { long startNext = scanStat.beginIteration(); boolean scanSuccessful = true; if (from == null) { scanSuccessful = scan.seekTo(); } else { int compare = scan.seekTo(from); if (compare == 0 && !fromInclusive || compare > 0) { // as from in exclusive and first key is same as from, skip the first key scanSuccessful = scan.next(); } } populateKV(startNext, scanSuccessful); }