You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/05/14 04:28:24 UTC

[GitHub] [flink] TsReaper commented on a change in pull request #12122: [FLINK-15102] Add continuousSource() method to StreamExecutionEnvironment.

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:
users@infra.apache.org