@Override public boolean doNext(WritableComparable key, Writable value) throws IOException { // if current pos is larger than shrinkedLength which is calculated for // each split by table sampling, stop fetching any more (early exit) if (target.shrinkedLength > 0 && context.getIoCxt().getCurrentBlockStart() > target.shrinkedLength) { return false; } return super.doNext(key, value); } };
@Override public boolean doNext(WritableComparable key, Writable value) throws IOException { // if current pos is larger than shrinkedLength which is calculated for // each split by table sampling, stop fetching any more (early exit) if (target.shrinkedLength > 0 && context.getIoCxt().getCurrentBlockStart() > target.shrinkedLength) { return false; } return super.doNext(key, value); } };
long current = ctx.getIoCxt().getCurrentBlockStart(); LongWritable old = (LongWritable) vcValues[i]; if (old == null) {
long current = ctx.getIoCxt().getCurrentBlockStart(); LongWritable old = (LongWritable) vcValues[i]; if (old == null) {
protected void updateIOContext() throws IOException { long pointerPos = this.getPos(); if (!ioCxtRef.isBlockPointer()) { ioCxtRef.setCurrentBlockStart(pointerPos); ioCxtRef.setCurrentRow(0); return; } ioCxtRef.setCurrentRow(ioCxtRef.getCurrentRow() + 1); if (ioCxtRef.getNextBlockStart() == -1) { ioCxtRef.setNextBlockStart(pointerPos); ioCxtRef.setCurrentRow(0); } if (pointerPos != ioCxtRef.getNextBlockStart()) { // the reader pointer has moved to the end of next block, or the end of // current record. ioCxtRef.setCurrentRow(0); if (ioCxtRef.getCurrentBlockStart() == ioCxtRef.getNextBlockStart()) { ioCxtRef.setCurrentRow(1); } ioCxtRef.setCurrentBlockStart(ioCxtRef.getNextBlockStart()); ioCxtRef.setNextBlockStart(pointerPos); } }
protected void updateIOContext() throws IOException { long pointerPos = this.getPos(); if (!ioCxtRef.isBlockPointer()) { ioCxtRef.setCurrentBlockStart(pointerPos); ioCxtRef.setCurrentRow(0); return; } ioCxtRef.setCurrentRow(ioCxtRef.getCurrentRow() + 1); if (ioCxtRef.getNextBlockStart() == -1) { ioCxtRef.setNextBlockStart(pointerPos); ioCxtRef.setCurrentRow(0); } if (pointerPos != ioCxtRef.getNextBlockStart()) { // the reader pointer has moved to the end of next block, or the end of // current record. ioCxtRef.setCurrentRow(0); if (ioCxtRef.getCurrentBlockStart() == ioCxtRef.getNextBlockStart()) { ioCxtRef.setCurrentRow(1); } ioCxtRef.setCurrentBlockStart(ioCxtRef.getNextBlockStart()); ioCxtRef.setNextBlockStart(pointerPos); } }
if (this.ioCxtRef.getCurrentBlockStart() == 0) {
if (this.ioCxtRef.getCurrentBlockStart() == 0) {
@Override public boolean doNext(WritableComparable key, Writable value) throws IOException { // if current pos is larger than shrinkedLength which is calculated for // each split by table sampling, stop fetching any more (early exit) if (target.shrinkedLength > 0 && context.getIoCxt().getCurrentBlockStart() > target.shrinkedLength) { return false; } return super.doNext(key, value); } };
private void populateVirtualColumnValues() { if (this.vcs != null) { ExecMapperContext mapExecCxt = this.getExecContext(); IOContext ioCxt = mapExecCxt.getIoCxt(); for (int i = 0; i < vcs.size(); i++) { VirtualColumn vc = vcs.get(i); if (vc.equals(VirtualColumn.FILENAME) && mapExecCxt.inputFileChanged()) { this.vcValues[i] = new Text(mapExecCxt.getCurrentInputFile()); } else if (vc.equals(VirtualColumn.BLOCKOFFSET)) { long current = ioCxt.getCurrentBlockStart(); LongWritable old = (LongWritable) this.vcValues[i]; if (old == null) { old = new LongWritable(current); this.vcValues[i] = old; continue; } if (current != old.get()) { old.set(current); } } } } }
long current = ctx.getIoCxt().getCurrentBlockStart(); LongWritable old = (LongWritable) vcValues[i]; if (old == null) {
protected void updateIOContext() throws IOException { long pointerPos = this.getPos(); if (!ioCxtRef.isBlockPointer()) { ioCxtRef.setCurrentBlockStart(pointerPos); ioCxtRef.setCurrentRow(0); return; } ioCxtRef.setCurrentRow(ioCxtRef.getCurrentRow() + 1); if (ioCxtRef.getNextBlockStart() == -1) { ioCxtRef.setNextBlockStart(pointerPos); ioCxtRef.setCurrentRow(0); } if (pointerPos != ioCxtRef.getNextBlockStart()) { // the reader pointer has moved to the end of next block, or the end of // current record. ioCxtRef.setCurrentRow(0); if (ioCxtRef.getCurrentBlockStart() == ioCxtRef.getNextBlockStart()) { ioCxtRef.setCurrentRow(1); } ioCxtRef.setCurrentBlockStart(ioCxtRef.getNextBlockStart()); ioCxtRef.setNextBlockStart(pointerPos); } }
if (this.ioCxtRef.getCurrentBlockStart() == 0) {