static int maxPartitions(Collection<StreamEdge> edges) {
    return edges.stream().mapToInt(StreamEdge::getPartitionCount).max().orElse(StreamEdge.PARTITIONS_UNKNOWN);
  }
Ensures all intermediate streams have been assigned partition counts.
samza-core/src/main/java/org/apache/samza/execution/IntermediateStreamManager.java