JingsongLi commented on a change in pull request #8295: [FLINK-11974][runtime]
Introduce StreamOperatorFactory
URL: https://github.com/apache/flink/pull/8295#discussion_r279175804
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
##########
@@ -648,12 +649,14 @@ private void configureCheckpointing() {
final ArrayList<MasterTriggerRestoreHook.Factory> hooks = new
ArrayList<>();
for (StreamNode node : streamGraph.getStreamNodes()) {
- StreamOperator<?> op = node.getOperator();
- if (op instanceof AbstractUdfStreamOperator) {
- Function f = ((AbstractUdfStreamOperator<?, ?>)
op).getUserFunction();
-
- if (f instanceof WithMasterCheckpointHook) {
- hooks.add(new
FunctionMasterCheckpointHookFactory((WithMasterCheckpointHook<?>) f));
+ if (node.getOperatorFactory() instanceof
SimpleOperatorFactory) {
+ SimpleOperatorFactory factory =
(SimpleOperatorFactory) node.getOperatorFactory();
+ if (factory.getOperator() instanceof
AbstractUdfStreamOperator) {
+ Function f =
((AbstractUdfStreamOperator<?, ?>) factory.getOperator()).getUserFunction();
+
+ if (f instanceof
WithMasterCheckpointHook) {
Review comment:
not exposing this capability to StreamOperatorFactory too.
----------------------------------------------------------------
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]
With regards,
Apache Git Services