@Override
  public Pair<List<OptimizingProcessInfo>, Integer> getOptimizingProcessesInfo(
      AmoroTable<?> amoroTable, String type, ProcessStatus status, int limit, int offset) {
    TableIdentifier tableIdentifier = amoroTable.id();
    int total = 0;
    // page helper is 1-based
    int pageNumber = (offset / limit) + 1;
    List<OptimizingProcessMeta> processMetaList = Collections.emptyList();
    try (Page<?> ignored = PageHelper.startPage(pageNumber, limit, true)) {
      processMetaList =
          getAs(
              OptimizingMapper.class,
              mapper ->
                  mapper.selectOptimizingProcesses(
                      tableIdentifier.getCatalog(),
                      tableIdentifier.getDatabase(),
                      tableIdentifier.getTableName(),
                      type,
                      status));
      PageInfo<OptimizingProcessMeta> pageInfo = new PageInfo<>(processMetaList);
      total = (int) pageInfo.getTotal();
      LOG.info(
          "Get optimizing processes total : {} , pageNumber:{}, limit:{}, offset:{}",
          total,
          pageNumber,
          limit,
          offset);
      if (pageInfo.getSize() == 0) {
        return Pair.of(Collections.emptyList(), 0);
      }
    }
    List<Long> processIds =
        processMetaList.stream()
            .map(OptimizingProcessMeta::getProcessId)
            .collect(Collectors.toList());
    Map<Long, List<OptimizingTaskMeta>> optimizingTasks =
        getAs(OptimizingMapper.class, mapper -> mapper.selectOptimizeTaskMetas(processIds)).stream()
            .collect(Collectors.groupingBy(OptimizingTaskMeta::getProcessId));

    LOG.info("Get {} optimizing tasks. ", optimizingTasks.size());
    return Pair.of(
        processMetaList.stream()
            .map(p -> buildOptimizingProcessInfo(p, optimizingTasks.get(p.getProcessId())))
            .collect(Collectors.toList()),
        total);
  }
Descriptor for Mixed-Hive, Mixed-Iceberg, Iceberg format tables.
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/MixedAndIcebergTableDescriptor.java