コード例 #1
0
  @Override
  public void init(Configuration conf) {
    tajoConf = (TajoConf) conf;

    queryTaskContext
        .getDispatcher()
        .register(TaskRunnerGroupEvent.EventType.class, new TajoTaskRunnerLauncher());
    //
    queryTaskContext
        .getDispatcher()
        .register(ContainerAllocatorEventType.class, new TajoWorkerAllocationHandler());

    super.init(conf);
  }
コード例 #2
0
  @Override
  public synchronized void stop() {
    if (stopped.get()) {
      return;
    }
    stopped.set(true);
    executorService.shutdownNow();

    Map<ContainerId, ContainerProxy> containers =
        queryTaskContext.getResourceAllocator().getContainers();
    List<ContainerProxy> list = new ArrayList<ContainerProxy>(containers.values());
    for (ContainerProxy eachProxy : list) {
      try {
        eachProxy.stopContainer();
      } catch (Exception e) {
      }
    }
    super.stop();
  }
コード例 #3
0
 @Override
 public void start() {
   super.start();
 }