private void showRecords(List<Header> headers, List<Record> records, Record selectedRecord) {
    TerminalPrinter printer = getTerminalPrinter(RECORD_START_ROW);
    int size;
    if (pageSize != null) {
      size = pageSize;
    } else {
      size = records.size();
    }
    List<String> buf = new ArrayList<>(headers.size());
    for (int i = 0; i < size; i++) {
      if (i < records.size()) {
        Record record = records.get(i);
        buf.clear();
        for (Header header : headers) {
          String value = "";
          if (record.containsKey(header.getField())) {
            value = record.get(header.getField()).asString();
          }

          buf.add(limitLineLength(String.format(header.format(), value), header.getLength()));
        }

        String recordString = String.join(" ", buf);
        if (!recordString.isEmpty()) {
          recordString += " ";
        }

        if (record == selectedRecord) {
          printer.startHighlight().print(recordString).stopHighlight().endOfLine();
        } else {
          printer.print(recordString).endOfLine();
        }
      } else {
        printer.endOfLine();
      }
    }
  }
The screen that provides a dynamic real-time view for the HBase metrics. This shows the metric
{@link Summary} and the metric {@link Record}s. The summary and the metrics are updated
periodically (3 seconds by default).
hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenView.java