container/src/main/java/com/streamsets/datacollector/runner/RunnerPool.java
public void destroy() throws PipelineRuntimeException {
    // Firstly set this runner as destroyed
    destroyed.set(true);

    // Validate that this thread pool have all runners back, otherwise we're missing something and that is sign of
    // a trouble.
    if(queue.size() < runtimeStats.getTotalRunners()) {
      throw new PipelineRuntimeException(ContainerError.CONTAINER_0802, queue.size(), runtimeStats.getTotalRunners());
    }
  }
public void destroy() throws PipelineRuntimeException {
    // Firstly set this runner as destroyed
    destroyed.set(true);

    // Validate that this thread pool have all runners back, otherwise we're missing something and that is sign of
    // a trouble.
    if(queue.size() < runtimeStats.getTotalRunners()) {
      throw new PipelineRuntimeException(ContainerError.CONTAINER_0802, queue.size(), runtimeStats.getTotalRunners());
    }
  }
Destroy only the pool itself - not the individual pipe runners.

This method will also validate that all runners were properly returned to the pool. PipelineRuntimeException will
be thrown if some runners are still running.

@throws PipelineRuntimeException