protected ReaderEvent getReaderEvent() throws IOException {
    try {
      ReaderEvent event = readerEvents.take();
      Preconditions.checkNotNull(event);
      return event;
    } catch (InterruptedException ie) {
      throw new RuntimeException("Interrupted while getting readerEvents, not expected: " + ie.getMessage(), ie);
    }
  }
Define success/error events which are passed to the reader from a different thread.
The reader will check for these events on end of input and interruption of the reader thread.
llap-client/src/java/org/apache/hadoop/hive/llap/LlapBaseRecordReader.java