public boolean handleRecordReaderNextException(Exception e)
      throws IOException {
    HiveIOExceptionNextHandleResult result = new HiveIOExceptionNextHandleResult();
    if (handlerChain != null && handlerChain.size() > 0) {
      for (HiveIOExceptionHandler handler : handlerChain) {
        handler.handleRecorReaderNextException(e, result);
        if (result.getHandled()) {
          return result.getHandleResult();
        }
      }
    }

    //re-throw the exception as an IOException
    throw new IOException(e);
  }
This is to handle exception when doing next operations. Here we use a
HiveIOExceptionNextHandleResult to store the results of each handler. If
the exception is handled by one handler, the handler should set
HiveIOExceptionNextHandleResult to be handled, and also set the handle
result. The handle result is used to return the reader's next to determine
if need to open a new file for read or not.
shims/common/src/main/java/org/apache/hadoop/hive/io/HiveIOExceptionHandlerChain.java