private void writeFileSystemStats(DataOutputStream out, HiveConf conf, List<Path> locations, Path tablePath)
      throws IOException {
    FileData fileData = getFileData(conf, locations, tablePath);

    out.write("totalNumberFiles:".getBytes(StandardCharsets.UTF_8));
    out.write((fileData.unknown ? UNKNOWN : "" + fileData.numOfFiles).getBytes(StandardCharsets.UTF_8));
    out.write(Utilities.newLineCode);

    if (fileData.numOfErasureCodedFiles > 0) {
      out.write("totalNumberErasureCodedFiles:".getBytes(StandardCharsets.UTF_8));
      out.write((fileData.unknown ? UNKNOWN : "" + fileData.numOfErasureCodedFiles).getBytes(StandardCharsets.UTF_8));
      out.write(Utilities.newLineCode);
    }

    out.write("totalFileSize:".getBytes(StandardCharsets.UTF_8));
    out.write((fileData.unknown ? UNKNOWN : "" + fileData.totalFileSize).getBytes(StandardCharsets.UTF_8));
    out.write(Utilities.newLineCode);

    out.write("maxFileSize:".getBytes(StandardCharsets.UTF_8));
    out.write((fileData.unknown ? UNKNOWN : "" + fileData.maxFileSize).getBytes(StandardCharsets.UTF_8));
    out.write(Utilities.newLineCode);

    out.write("minFileSize:".getBytes(StandardCharsets.UTF_8));
    if (fileData.numOfFiles > 0) {
      out.write((fileData.unknown ? UNKNOWN : "" + fileData.minFileSize).getBytes(StandardCharsets.UTF_8));
    } else {
      out.write((fileData.unknown ? UNKNOWN : "" + 0).getBytes(StandardCharsets.UTF_8));
    }
    out.write(Utilities.newLineCode);

    out.write("lastAccessTime:".getBytes(StandardCharsets.UTF_8));
    out.writeBytes((fileData.unknown || fileData.lastAccessTime < 0) ? UNKNOWN : "" + fileData.lastAccessTime);
    out.write(Utilities.newLineCode);

    out.write("lastUpdateTime:".getBytes(StandardCharsets.UTF_8));
    out.write((fileData.unknown ? UNKNOWN : "" + fileData.lastUpdateTime).getBytes(StandardCharsets.UTF_8));
    out.write(Utilities.newLineCode);
  }
Formats SHOW TABLE STATUS commands to text format.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/show/status/formatter/TextShowTableStatusFormatter.java