public void processProcedureWALFile(ProcedureWALFile log) throws IOException {
    log.open();
    ProcedureWALHeader header = log.getHeader();
    printHeader(header);

    FSDataInputStream stream = log.getStream();
    try {
      boolean hasMore = true;
      while (hasMore) {
        ProcedureWALEntry entry = ProcedureWALFormat.readEntry(stream);
        if (entry == null) {
          out.println("No more entry, exiting with missing EOF");
          hasMore = false;
          break;
        }
        switch (entry.getType()) {
          case PROCEDURE_WAL_EOF:
            hasMore = false;
            break;
          default:
            printEntry(entry);
        }
      }
    } catch (IOException e) {
      out.println("got an exception while reading the procedure WAL " + e.getMessage());
    } finally {
      log.close();
    }
  }
Reads a log file and outputs its contents.
@param conf HBase configuration relevant to this log file
@param p    path of the log file to be read
@throws IOException IOException
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALPrettyPrinter.java