private boolean allTasksPrepared() {
      if (!taskMap.isEmpty()) {
        return taskMap.values().stream().allMatch(t -> t.getStatus() == TaskRuntime.Status.SUCCESS);
      }
      return false;
    }
if all tasks are Prepared

@return true if tasks is not empty and all Prepared
amoro-ams/src/main/java/org/apache/amoro/server/optimizing/OptimizingQueue.java