private void printFileStatus(SessionState.LogHelper console, FileSystem fs, Path dir) throws Exception {
    List<FileStatus> fileList = Arrays.asList(fs.listStatus(dir, hiddenFileFilter));
    Collections.sort(fileList);

    for (FileStatus fileStatus : fileList) {
      if (fileStatus.isDirectory()) {

        // delta directory in case of ACID
        printFileStatus(console, fs, fileStatus.getPath());
      } else {

        LOG.info("Printing orc file dump for " + fileStatus.getPath());
        if (fileStatus.getLen() > 0) {
          try {
            try (Reader notUsed = OrcFile.createReader(fs, fileStatus.getPath())) {
              // just creating orc reader is going to do sanity checks to make sure its valid ORC file
            }
            console.printError("-- BEGIN ORC FILE DUMP --");
            FileDump.main(new String[]{fileStatus.getPath().toString(), "--rowindex=*"});
            console.printError("-- END ORC FILE DUMP --");
          } catch (FileFormatException e) {
            LOG.warn("File " + fileStatus.getPath() + " is not ORC. Skip printing orc file dump");
          } catch (IOException e) {
            LOG.warn("Skip printing orc file dump. Exception: " + e.getMessage());
          }
        } else {
          LOG.warn("Zero length file encountered. Skip printing orc file dump.");
        }
      }
    }
  }
Post exec hook to print orc file dump for files that will be read by fetch task. The file dump
output will be printed before fetch task output. It also prints the row index for the 1st column
in the file just to verify the impact of bloom filter fpp.
ql/src/java/org/apache/hadoop/hive/ql/hooks/PostExecOrcFileDump.java