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; }
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; }
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; }
public boolean nextBlock() throws IOException { int keyLength = nextKeyBuffer(); if(keyLength > 0) { currentValueBuffer(); return true; } return false; }
public boolean nextBlock() throws IOException { int keyLength = nextKeyBuffer(); if(keyLength > 0) { currentValueBuffer(); return true; } return false; }
public boolean nextBlock() throws IOException { int keyLength = nextKeyBuffer(); if(keyLength > 0) { currentValueBuffer(); return true; } return false; }