if (null == this.traversalSupplier) {
throw new IllegalArgumentException("The configuration does not have a traversal supplier");
}
final Traversal<?, ?> traversal = this.traversalSupplier.get().get();
traversal.getSteps().stream().filter(step -> step instanceof MapReducer).forEach(step -> {
final MapReduce mapReduce = ((MapReducer) step).getMapReduce();
this.mapReducers.add(mapReduce);
});
if (!(TraversalHelper.getEnd(traversal) instanceof SideEffectCapStep))
this.mapReducers.add(new TraverserMapReduce(TraversalHelper.getEnd(traversal)));