container/src/main/java/com/streamsets/datacollector/runner/RunnerPool.java
public T getRunner() throws PipelineRuntimeException {
    validateNotDestroyed();

    try {
      return queue.take().runner;
    } catch (InterruptedException e) {
      throw new PipelineRuntimeException(ContainerError.CONTAINER_0801, e);
    } finally {
      runtimeStats.setAvailableRunners(queue.size());
      histogram.update(queue.size());
    }
  }
public T getRunner() throws PipelineRuntimeException {
    validateNotDestroyed();

    try {
      return queue.take().runner;
    } catch (InterruptedException e) {
      throw new PipelineRuntimeException(ContainerError.CONTAINER_0801, e);
    } finally {
      runtimeStats.setAvailableRunners(queue.size());
      histogram.update(queue.size());
    }
  }
Get exclusive runner for use.

@return Runner that is not being used by anyone else.
@throws PipelineRuntimeException Thrown in case that current thread is unexpectedly interrupted