protected void setCurrentCell(Cell newVal) throws IOException { this.cur = newVal; if (this.cur != null && this.reader.isBulkLoaded() && !this.reader.isSkipResetSeqId()) { PrivateCellUtil.setSequenceId(cur, this.reader.getSequenceID()); } }
@Override public Cell next() throws IOException { Cell retKey = cur; try { // only seek if we aren't at the end. cur == null implies 'end'. if (cur != null) { hfs.next(); setCurrentCell(hfs.getCell()); if (hasMVCCInfo || this.reader.isBulkLoaded()) { skipKVsNewerThanReadpoint(); } } } catch (FileNotFoundException e) { throw e; } catch(IOException e) { throw new IOException("Could not iterate " + this, e); } return retKey; }
@Override public boolean seek(Cell key) throws IOException { if (seekCount != null) seekCount.increment(); try { try { if(!seekAtOrAfter(hfs, key)) { this.cur = null; return false; } setCurrentCell(hfs.getCell()); if (!hasMVCCInfo && this.reader.isBulkLoaded()) { return skipKVsNewerThanReadpoint(); } else { return !hasMVCCInfo ? true : skipKVsNewerThanReadpoint(); } } finally { realSeekDone = true; } } catch (FileNotFoundException e) { throw e; } catch (IOException ioe) { throw new IOException("Could not seek " + this + " to key " + key, ioe); } }
@Override public boolean reseek(Cell key) throws IOException { if (seekCount != null) seekCount.increment(); try { try { if (!reseekAtOrAfter(hfs, key)) { this.cur = null; return false; } setCurrentCell(hfs.getCell()); if (!hasMVCCInfo && this.reader.isBulkLoaded()) { return skipKVsNewerThanReadpoint(); } else { return !hasMVCCInfo ? true : skipKVsNewerThanReadpoint(); } } finally { realSeekDone = true; } } catch (FileNotFoundException e) { throw e; } catch (IOException ioe) { throw new IOException("Could not reseek " + this + " to key " + key, ioe); } }
if (r.isBulkLoaded()) { fd.maxMVCCReadpoint = Math.max(fd.maxMVCCReadpoint, r.getSequenceID());