/** * Read in next key buffer and throw any data in current key buffer and * current value buffer. It will influence the result of * {@link #next(LongWritable)} and * {@link #getCurrentRow(BytesRefArrayWritable)} * * @return whether there still has records or not * @throws IOException */ @SuppressWarnings("unused") @Deprecated public synchronized boolean nextColumnsBatch() throws IOException { passedRowsNum += (recordsNumInValBuffer - readRowsIndexInBuffer); return nextKeyBuffer() > 0; }
/** * Read in next key buffer and throw any data in current key buffer and * current value buffer. It will influence the result of * {@link #next(LongWritable)} and * {@link #getCurrentRow(BytesRefArrayWritable)} * * @return whether there still has records or not * @throws IOException */ @SuppressWarnings("unused") @Deprecated public synchronized boolean nextColumnsBatch() throws IOException { passedRowsNum += (recordsNumInValBuffer - readRowsIndexInBuffer); return nextKeyBuffer() > 0; }
private int nextKeyValueTolerateCorruptions() throws IOException { long currentOffset = in.getPos(); int ret; try { ret = nextKeyBuffer(); this.currentValueBuffer(); } catch (IOException ioe) { // A BlockMissingException indicates a temporary error, // not a corruption. Re-throw this exception. String msg = ioe.getMessage(); if (msg != null && msg.startsWith(BLOCK_MISSING_MESSAGE)) { LOG.warn("Re-throwing block-missing exception" + ioe); throw ioe; } // We have an IOException other than a BlockMissingException. LOG.warn("Ignoring IOException in file " + file + " after offset " + currentOffset, ioe); ret = -1; } catch (Throwable t) { // We got an exception that is not IOException // (typically OOM, IndexOutOfBounds, InternalError). // This is most likely a corruption. LOG.warn("Ignoring unknown error in " + file + " after offset " + currentOffset, t); ret = -1; } return ret; }
} else { try { ret = nextKeyBuffer(); } catch (EOFException eof) { eof.printStackTrace();
private int nextKeyValueTolerateCorruptions() throws IOException { long currentOffset = in.getPos(); int ret; try { ret = nextKeyBuffer(); this.currentValueBuffer(); } catch (IOException ioe) { // A BlockMissingException indicates a temporary error, // not a corruption. Re-throw this exception. String msg = ioe.getMessage(); if (msg != null && msg.startsWith(BLOCK_MISSING_MESSAGE)) { LOG.warn("Re-throwing block-missing exception" + ioe); throw ioe; } // We have an IOException other than a BlockMissingException. LOG.warn("Ignoring IOException in file " + file + " after offset " + currentOffset, ioe); ret = -1; } catch (Throwable t) { // We got an exception that is not IOException // (typically OOM, IndexOutOfBounds, InternalError). // This is most likely a corruption. LOG.warn("Ignoring unknown error in " + file + " after offset " + currentOffset, t); ret = -1; } return ret; }
ret = nextKeyBuffer(); } catch (EOFException eof) { eof.printStackTrace();
/** * Read in next key buffer and throw any data in current key buffer and * current value buffer. It will influence the result of * {@link #next(LongWritable)} and * {@link #getCurrentRow(BytesRefArrayWritable)} * * @return whether there still has records or not * @throws IOException */ public synchronized boolean nextColumnsBatch() throws IOException { passedRowsNum += (recordsNumInValBuffer - readRowsIndexInBuffer); return nextKeyBuffer() > 0; }
/** * Read in next key buffer and throw any data in current key buffer and * current value buffer. It will influence the result of * {@link #next(LongWritable)} and * {@link #getCurrentRow(BytesRefArrayWritable)} * * @return whether there still has records or not * @throws IOException */ @SuppressWarnings("unused") @Deprecated public synchronized boolean nextColumnsBatch() throws IOException { passedRowsNum += (recordsNumInValBuffer - readRowsIndexInBuffer); return nextKeyBuffer() > 0; }
protected void currentValueBuffer() throws IOException { if (!keyInit) { nextKeyBuffer(); } currentValue.keyBuffer = currentKey; currentValue.clearColumnBuffer(); currentValue.readFields(in); currentValue.inited = true; }
public boolean nextBlock() throws IOException { int keyLength = nextKeyBuffer(); if(keyLength > 0) { currentValueBuffer(); return true; } return false; }
protected void currentValueBuffer() throws IOException { if (!keyInit) { nextKeyBuffer(); } currentValue.keyBuffer = currentKey; currentValue.clearColumnBuffer(); currentValue.readFields(in); currentValue.inited = true; }
private int nextKeyValueTolerateCorruptions() throws IOException { long currentOffset = in.getPos(); int ret; try { ret = nextKeyBuffer(); this.currentValueBuffer(); } catch (IOException ioe) { // A BlockMissingException indicates a temporary error, // not a corruption. Re-throw this exception. String msg = ioe.getMessage(); if (msg != null && msg.startsWith(BLOCK_MISSING_MESSAGE)) { LOG.warn("Re-throwing block-missing exception" + ioe); throw ioe; } // We have an IOException other than a BlockMissingException. LOG.warn("Ignoring IOException in file " + file + " after offset " + currentOffset, ioe); ret = -1; } catch (Throwable t) { // We got an exception that is not IOException // (typically OOM, IndexOutOfBounds, InternalError). // This is most likely a corruption. LOG.warn("Ignoring unknown error in " + file + " after offset " + currentOffset, t); ret = -1; } return ret; }
} else { try { ret = nextKeyBuffer(); } catch (EOFException eof) { eof.printStackTrace();
} else { try { ret = nextKeyBuffer(); } catch (EOFException eof) { eof.printStackTrace();
public boolean nextBlock() throws IOException { int keyLength = nextKeyBuffer(); if(keyLength > 0) { currentValueBuffer(); return true; } return false; }
protected void currentValueBuffer() throws IOException { if (!keyInit) { nextKeyBuffer(); } currentValue.keyBuffer = currentKey; currentValue.clearColumnBuffer(); currentValue.readFields(in); currentValue.inited = true; }
public boolean nextBlock() throws IOException { int keyLength = nextKeyBuffer(); if(keyLength > 0) { currentValueBuffer(); return true; } return false; }
protected void currentValueBuffer() throws IOException { if (!keyInit) { nextKeyBuffer(); } currentValue.keyBuffer = currentKey; currentValue.clearColumnBuffer(); currentValue.readFields(in); currentValue.inited = true; }