wsry commented on code in PR #20351:
URL: https://github.com/apache/flink/pull/20351#discussion_r932910043
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java:
##########
@@ -963,6 +975,61 @@ private void setVertexConfig(
vertexConfigs.put(vertexID, config);
}
+ private List<NonChainedOutput> mayReuseNonChainedOutputs(
+ int vertexId, List<StreamEdge> consumerEdges) {
+ if (consumerEdges.isEmpty()) {
+ return new ArrayList<>();
+ }
+ List<NonChainedOutput> outputs = new ArrayList<>(consumerEdges.size());
+ Map<StreamEdge, NonChainedOutput> outputsConsumedByEdge =
+ opIntermediateOutputs.computeIfAbsent(vertexId, ignored -> new
HashMap<>());
+ for (StreamEdge consumerEdge : consumerEdges) {
+ checkState(vertexId == consumerEdge.getSourceId(), "Vertex id must
be the same.");
+ int consumerParallelism =
+
streamGraph.getStreamNode(consumerEdge.getTargetId()).getParallelism();
+ int consumerMaxParallelism =
+
streamGraph.getStreamNode(consumerEdge.getTargetId()).getMaxParallelism();
+ StreamPartitioner<?> partitioner = consumerEdge.getPartitioner();
+ ResultPartitionType partitionType =
getResultPartitionType(consumerEdge);
+ NonChainedOutput output =
+ new NonChainedOutput(
+ consumerEdge.supportsUnalignedCheckpoints(),
+ consumerEdge.getSourceId(),
+ consumerParallelism,
+ consumerMaxParallelism,
+ consumerEdge.getBufferTimeout(),
+ new IntermediateDataSetID(),
+ consumerEdge.getOutputTag(),
+ partitioner,
+ partitionType);
+
+ if (consumerEdge.getOutputTag() != null ||
!partitionType.isReconsumable()) {
Review Comment:
I think that should work, I have made the change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]