public static long getRecordCnt(ContentFile<?>[] contentFiles) {
    int recordCnt = 0;
    if (contentFiles != null) {
      for (ContentFile<?> contentFile : contentFiles) {
        recordCnt += contentFile.recordCount();
      }
    }
    return recordCnt;
  }
Build current table optimize info.

@return TableOptimizeInfo
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/utils/OptimizingUtil.java