@Override
  public void stopExecution(ExecutionContext context, int exeId) throws ExecutorException {
    SamzaSqlApplicationRunner runner = executions.get(exeId);
    if (runner != null) {
      LOG.debug("Stopping execution ", exeId);
      try {
        runner.kill();
      } catch (SamzaException ex) {
        throw new ExecutorException(ex);
      }
    } else {
      throw new ExecutorException("Trying to stop a non-existing SQL execution " + exeId);
    }
  }
Samza implementation of Executor for Samza SQL Shell.
samza-sql-shell/src/main/java/org/apache/samza/sql/client/impl/SamzaExecutor.java