TsReaper commented on a change in pull request #12122:
URL: https://github.com/apache/flink/pull/12122#discussion_r424864050
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
##########
@@ -432,6 +434,20 @@ private StreamConfig createJobVertex(
chainedNames.get(streamNodeId),
jobVertexId,
operatorIDPairs);
+ if (streamNode.getOperatorFactory() instanceof
CoordinatedOperatorFactory) {
+ OperatorCoordinator.Provider
coordinatorProvider =
+
((CoordinatedOperatorFactory<?>) streamNode
+
.getOperatorFactory())
+
.getCoordinatorProvider(
+
chainedNames.get(streamNodeId),
+
new OperatorID(hashes.get(streamNodeId)));
+ try {
+ jobVertex.addOperatorCoordinator(new
SerializedValue<>(coordinatorProvider));
+ } catch (IOException e) {
+ throw new
FlinkRuntimeException(String.format(
+ "Coordinator Provider
for node %s is not serializable.", chainedNames.get(streamNodeId)));
+ }
+ }
Review comment:
This will only add the coordinator of the head of the operator chain
into the job vertex, coordinators of other operators will be lost.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]