@Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    if (numMap > 0) {
      sb.append("Map: " + numMap + "  ");
    }

    if (numReduce > 0) {
      sb.append("Reduce: " + numReduce + "  ");
    }

    if (cpuMSec > 0) {
      sb.append(" Cumulative CPU: " + (cpuMSec / 1000D) + " sec  ");
    }

    if (counters != null) {
      Counter hdfsReadCntr = counters.findCounter("FileSystemCounters",
          "HDFS_BYTES_READ");
      long hdfsRead;
      if (hdfsReadCntr != null && (hdfsRead = hdfsReadCntr.getValue()) >= 0) {
        sb.append(" HDFS Read: " + hdfsRead);
      }

      Counter hdfsWrittenCntr = counters.findCounter("FileSystemCounters",
          "HDFS_BYTES_WRITTEN");
      long hdfsWritten;
      if (hdfsWrittenCntr != null && (hdfsWritten = hdfsWrittenCntr.getValue()) >= 0) {
        sb.append(" HDFS Write: " + hdfsWritten);
      }

      HadoopShims.HdfsErasureCodingShim erasureShim = getHdfsErasureCodingShim();

      if (erasureShim != null && erasureShim.isMapReduceStatAvailable()) {
        // Erasure Coding stats - added in HADOOP-15507, expected in Hadoop 3.2.0
        Counter hdfsReadEcCntr = counters.findCounter("FileSystemCounters",
            "HDFS_BYTES_READ_EC"); // FileSystemCounter.BYTES_READ_EC
        if (hdfsReadEcCntr != null) {
          long hdfsReadEc = hdfsReadEcCntr.getValue();
          if (hdfsReadEc >= 0) {
            sb.append(" HDFS EC Read: " + hdfsReadEc);
          }
        }
      }
    }

    sb.append(" " + (success ? "SUCCESS" : "FAIL"));

    return sb.toString();
  }
MapRedStats.

A data structure to keep one mapreduce's stats:
number of mappers, number of reducers, accumulative CPU time and whether it
succeeds.
ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java