Пример #1
0
  @Override
  public void start() {
    LOG.info("Start TaskScheduler");
    maximumRequestContainer =
        tajoConf.getInt(REQUEST_MAX_NUM, stage.getContext().getWorkerMap().size() * 2);

    if (isLeaf) {
      candidateWorkers.addAll(getWorkerIds(getLeafTaskHosts()));
    } else {
      // find assigned hosts for Non-Leaf locality in children executionBlock
      List<ExecutionBlock> executionBlockList = stage.getMasterPlan().getChilds(stage.getBlock());
      for (ExecutionBlock executionBlock : executionBlockList) {
        Stage childStage = stage.getContext().getStage(executionBlock.getId());
        candidateWorkers.addAll(childStage.getAssignedWorkerMap().keySet());
      }
    }

    this.schedulingThread.start();
    super.start();
  }