@Override
  public void execute(DefaultTableRuntime tableRuntime) {
    try {
      DefaultOptimizingState optimizingState = tableRuntime.getOptimizingState();
      long lastOptimizedSnapshotId = optimizingState.getLastOptimizedSnapshotId();
      long lastOptimizedChangeSnapshotId = optimizingState.getLastOptimizedChangeSnapshotId();
      AmoroTable<?> table = loadTable(tableRuntime);
      optimizingState.refresh(table);
      MixedTable mixedTable = (MixedTable) table.originalTable();
      if ((mixedTable.isKeyedTable()
              && (lastOptimizedSnapshotId != optimizingState.getCurrentSnapshotId()
                  || lastOptimizedChangeSnapshotId != optimizingState.getCurrentChangeSnapshotId()))
          || (mixedTable.isUnkeyedTable()
              && lastOptimizedSnapshotId != optimizingState.getCurrentSnapshotId())) {
        tryEvaluatingPendingInput(tableRuntime, mixedTable);
      }
    } catch (Throwable throwable) {
      logger.error("Refreshing table {} failed.", tableRuntime.getTableIdentifier(), throwable);
    }
  }
Executor that refreshes table runtimes and evaluates optimizing status periodically.
amoro-ams/src/main/java/org/apache/amoro/server/scheduler/inline/TableRuntimeRefreshExecutor.java