/**
   * @param conf used to contact HBase and to run jobs against
   * @param cluster for which to process records.
   * @param processFileSubstring return rows where the process file path contains this string. If
   *     <code>null</code> or empty string, then no filtering is applied.
   * @return whether all job files for all processRecords were properly Printed.
   * @throws IOException
   */
  private boolean printProcessRecordsFromHBase(
      Configuration conf, String cluster, int maxCount, String processFileSubstring)
      throws IOException {
    ProcessRecordService processRecordService = new ProcessRecordService(conf);
    List<ProcessRecord> processRecords =
        processRecordService.getProcessRecords(cluster, maxCount, processFileSubstring);
    try {

      int jobFileCount = 0;

      System.out.println("ProcessRecords for " + cluster + ": " + processRecords.size());

      // Iterate over 0 based list in reverse order
      for (int j = processRecords.size() - 1; j >= 0; j--) {
        ProcessRecord processRecord = processRecords.get(j);

        // Print the whole thing.
        System.out.println(processRecord);
        jobFileCount += processRecord.getProcessedJobFiles();
      }
      System.out.println(
          "Printed "
              + processRecords.size()
              + " records with a total of "
              + jobFileCount
              + " files.");
    } finally {
      processRecordService.close();
    }

    return true;
  }