majin1102 commented on code in PR #3231:
URL: https://github.com/apache/amoro/pull/3231#discussion_r1792930772


##########
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/controller/OptimizerController.java:
##########
@@ -75,10 +76,15 @@ public void getOptimizerTables(Context ctx) {
     List<TableRuntime> tableRuntimes =
         tableRuntimeBeans.stream()
             .map(meta -> tableService.getRuntime(meta.getTableId()))
+            .filter(Objects::nonNull)

Review Comment:
   Since we are using the in-memory table runtime list, why do we still need to 
query the ID list from the database and get list count from memory? 
   It seems quite fragmented



##########
amoro-ams/src/main/java/org/apache/amoro/server/table/TableManager.java:
##########
@@ -33,6 +35,9 @@ public interface TableManager extends TableRuntimeHandler {
 
   TableRuntime getRuntime(Long tableId);
 
+  /** Get the count of table runtimes associated to the given filter. */
+  int getRuntimeCount(@Nullable String dbFilter, @Nullable String tableFilter);

Review Comment:
   I think instead of defining such an interface, it would be better to 
directly define a listRuntimes interface.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@amoro.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to