@Override
  public void abortQuery(QueryId queryId) {
    Map<FragmentInstanceId, Set<DriverTask>> queryRelatedTasks = queryMap.remove(queryId);
    if (queryRelatedTasks != null) {
      for (Set<DriverTask> fragmentRelatedTasks : queryRelatedTasks.values()) {
        if (fragmentRelatedTasks != null) {
          for (DriverTask task : fragmentRelatedTasks) {
            task.setAbortCause(
                new DriverTaskAbortedException(
                    task.getDriverTaskId().getFullId(),
                    DriverTaskAbortedException.BY_QUERY_CASCADING_ABORTED));
            clearDriverTask(task);
          }
        }
      }
    }
  }
The manager of fragment instances scheduling.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java