code: private void finishTask(TaskControllerContext context,
        TaskCommands command) throws IOException{
      if(context.task == null) {
        LOG.info("Context task null not killing the JVM");
        return;
      }
      ShellCommandExecutor shExec = buildTaskControllerExecutor(
          command, context.env.conf.getUser(), 
          buildKillTaskCommandArgs(context), context.env.workDir,
          context.env.env);
      try {
        shExec.execute();
      } catch (Exception e) {
        LOG.warn("Output from task-contoller is : " + shExec.getOutput());
        throw new IOException(e);
      }
    }
docs: Convenience method used to sending appropriate Kill signal to the task
  VM
  @param context
  @param command
  @throws IOException