@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();
  }
 @Override
 public void run() {
   LOG.info("ContainerProxy stopped:" + id + "," + proxy.getId());
   proxy.stopContainer();
 }