void addIntermediateStream(StreamSpec streamSpec, JobNode from, JobNode to) {
    StreamEdge edge = getOrCreateStreamEdge(streamSpec, true);
    edge.addSourceNode(from);
    edge.addTargetNode(to);
    from.addOutEdge(edge);
    to.addInEdge(edge);
    intermediateStreams.add(edge);
  }
Add an intermediate stream from source to target {@link JobNode}
@param streamSpec intermediate stream
@param from the source node
@param to the target node
samza-core/src/main/java/org/apache/samza/execution/JobGraph.java