container/src/main/java/com/streamsets/datacollector/runner/SourcePipe.java
public Map<String, Object> finishBatchContext(BatchContextImpl batchContext) throws StageException {
    return finishBatchAndCalculateMetrics(
      batchContext.getStartTime(),
      batchContext.getPipeBatch(),
      (BatchMakerImpl) batchContext.getBatchMaker(),
      batchContext.getPipeBatch().getBatch(this),
      batchContext.getPipeBatch().getErrorSink(),
      batchContext.getPipeBatch().getEventSink(),
      null
    );
  }
public Map<String, Object> finishBatchContext(BatchContextImpl batchContext) throws StageException {
    return finishBatchAndCalculateMetrics(
      batchContext.getStartTime(),
      batchContext.getPipeBatch(),
      (BatchMakerImpl) batchContext.getBatchMaker(),
      batchContext.getPipeBatch().getBatch(this),
      batchContext.getPipeBatch().getErrorSink(),
      batchContext.getPipeBatch().getEventSink(),
      null
    );
  }
public Map < String , Object > finishBatchContext ( BatchContextImpl batchContext ) throws StageException { return finishBatchAndCalculateMetrics ( batchContext . getStartTime ( ) , batchContext . getPipeBatch ( ) , ( BatchMakerImpl ) batchContext . getBatchMaker ( ) , batchContext . getPipeBatch ( ) . getBatch ( this ) , batchContext . getPipeBatch ( ) . getErrorSink ( ) , batchContext . getPipeBatch ( ) . getEventSink ( ) , null ) ; }
Finish batch from the origin's perspective.

@param batchContext Batch context enriched by prepareBatchContext
@return Map with statistics that are usually stored inside the Pipe object itself.
Finish batch from the origin s perspective .