public void close() throws IOException {
      if (orcWriter != null) {
        try {
          orcWriter.close();
          orcWriter = null;
        } catch (Exception ex) {
          LlapIoImpl.LOG.error("Failed to close ORC writer", ex);
        }
      }
      if (cacheWriter != null) {
        try {
          cacheWriter.discardData();
          cacheWriter = null;
        } catch (Exception ex) {
          LlapIoImpl.LOG.error("Failed to close cache writer", ex);
        }
      }
    }
This class only exists because Java doesn't have yield return. The original method
before this change only needed yield return-s sprinkled here and there; however,
Java developers are usually paid by class, so here we go.
llap-server/src/java/org/apache/hadoop/hive/llap/io/encoded/SerDeEncodedDataReader.java