public void printToConsole(List<MetadataTableSummary> tableSummariesList,
      MetaSummarySchema extraSchema) {
    System.out.println(
        "----    ----    ----    ----    ----    ----    ----    ----    ----    ----    ----    ----    ----   LEGEND -----    ----    ----    ----    ---    -----     ----    ----    ----    -----");
    System.out.print("\033[0;1m#COLS\033[0m ");
    System.out.print("--> # of columns in the table ");
    System.out.print("\033[0;1m#PARTS\033[0m ");
    System.out.print("--> # of Partitions ");
    System.out.print("\033[0;1m#ROWS\033[0m ");
    System.out.print("--> # of rows in table ");
    System.out.print("\033[0;1m#FILES\033[0m ");
    System.out.print("--> No of files in table ");
    System.out.print("\033[0;1mSIZE\033[0m ");
    System.out.print("--> Size of table in bytes ");
    System.out.print("\033[0;1m#PCOLS\033[0m ");
    System.out.print("--> # of partition columns ");
    System.out.print("\033[0;1m#ARR\033[0m ");
    System.out.print("--> # of array columns ");
    System.out.print("\033[0;1m#STRT\033[0m ");
    System.out.print("--> # of struct columns ");
    System.out.print("\033[0;1m#MAP\033[0m ");
    System.out.print("--> # of map columns ");
    StringBuilder format = new StringBuilder("");
    List<String> extraFields = extraSchema.getFields();
    List<String> upperFields = new ArrayList<>(extraFields.size());
    List<String> columns = new ArrayList<>(Arrays.asList("DATABASE",
        "TABLE NAME", "OWNER", "#COLS", "#PARTS", "TYPE", "FORMAT", "COMPRESSION", "#ROWS", "#FILES", "SIZE(b)", "#PCOLS",
        "#ARR", "#STRT", "#MAP"));
    int colIndex = columns.size() + 1;
    for (String field : extraFields) {
      String upperField = field.toUpperCase();
      System.out.print("\033[0;1m#" + upperField + "\033[0m ");
      System.out.print("--> # extra summary field ");
      upperFields.add(upperField);
      format.append(" %").append(colIndex++).append("$15s ");
    }
    System.out.println("");
    System.out.println(
        "-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
    System.out.println(
        "                                                                                                    Metadata Summary                                                                                                        ");
    System.out.println(
        "-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
    System.out.print("\033[0;1m");

    columns.addAll(upperFields);
    System.out.printf("%1$20s %2$30s %3$10s %4$5s %5$5s %6$15s %7$15s %8$10s %9$10s %10$10s %11$10s %12$10s %13$5s %14$5s %15$5s" + format, columns.toArray());
    System.out.print("\033[0m");
    System.out.println();
    System.out.println(
        "------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
    String[] values = new String[extraSchema.size()];
    Arrays.fill(values, "-");
    for (MetadataTableSummary summary : tableSummariesList) {
      Map<String, Object> extraSummary = summary.getExtraSummary();
      if (extraSummary != null) {
        for (int i = 0; i < extraSchema.size(); i++) {
          Object val = extraSummary.get(extraFields.get(i));
          if (val != null) {
            values[i] = String.valueOf(val);
          }
        }
      }
      List<Object> vals =  new ArrayList<>(Arrays.asList(summary.getDbName(), summary.getTblName(), summary.getOwner(), summary.getColCount(), summary.getPartitionCount(),
          summary.getTableType(), summary.getFileFormat(), summary.getCompressionType(), summary.getNumRows(),
          summary.getNumFiles(), summary.getTotalSize(), summary.getPartitionColumnCount(),
          summary.getArrayColumnCount(), summary.getStructColumnCount(), summary.getMapColumnCount()));
      vals.addAll(Arrays.asList(values));
      System.out.format("%1$20s %2$30s %3$10s %4$5d %5$5d %6$15s %7$15s %8$10s %9$10s %10$10s %11$10s %12$10s %13$5d %14$5d %15$5d" + format, vals.toArray());
      System.out.println();
      Arrays.fill(values, "-");
    }
    System.out.println(
        "------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
  }
Exporting the MetadataSummary in CONSOLE.

@param tableSummariesList
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/metatool/MetaToolTaskMetadataSummary.java