private static void validateIntermediateStreamPartitions(JobGraph jobGraph) {
    for (StreamEdge edge : jobGraph.getIntermediateStreamEdges()) {
      if (edge.getPartitionCount() <= 0) {
        throw new SamzaException(String.format("Failed to assign valid partition count to Stream %s", edge.getName()));
      }
    }
  }
Ensures all intermediate streams have been assigned partition counts.
samza-core/src/main/java/org/apache/samza/execution/IntermediateStreamManager.java