private List<OverviewTopTableItem> getTopTables(
      boolean asc, Comparator<OverviewTopTableItem> comparator, int limit) {
    return manager.getAllTopTableItem().stream()
        .sorted(
            asc
                ? comparator.thenComparing(OverviewTopTableItem::getTableName)
                : comparator.reversed().thenComparing(OverviewTopTableItem::getTableName))
        .limit(limit)
        .collect(Collectors.toList());
  }
The controller that handles overview page requests.
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/controller/OverviewController.java