container/src/main/java/com/streamsets/datacollector/runner/PipeRunner.java
public void forEach(ThrowingConsumer<Pipe> consumer) {
    try {
      MDC.put(LogConstants.RUNNER, String.valueOf(runnerId));
      try {
        for(Pipe p : pipes) {
          MDC.put(LogConstants.STAGE, p.getStage().getInfo().getInstanceName());
          acceptConsumer(consumer, p);
        }
      } finally {
        MDC.put(LogConstants.RUNNER, "");
        MDC.put(LogConstants.STAGE, "");
      }
    } catch (PipelineException|StageException e) {
      throw new RuntimeException(e);
    }
  }
public void forEach(ThrowingConsumer<Pipe> consumer) {
    try {
      MDC.put(LogConstants.RUNNER, String.valueOf(runnerId));
      try {
        for(Pipe p : pipes) {
          MDC.put(LogConstants.STAGE, p.getStage().getInfo().getInstanceName());
          acceptConsumer(consumer, p);
        }
      } finally {
        MDC.put(LogConstants.RUNNER, "");
        MDC.put(LogConstants.STAGE, "");
      }
    } catch (PipelineException|StageException e) {
      throw new RuntimeException(e);
    }
  }
Execute given consumer for each pipe, rethrowing usual exceptions as RuntimeException.

Suitable for consumer that is not suppose to throw PipelineException and StageException. This method will
not calculate usual stage metrics.