pnowojski commented on a change in pull request #8295: [FLINK-11974][runtime]
Introduce StreamOperatorFactory
URL: https://github.com/apache/flink/pull/8295#discussion_r281087657
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
##########
@@ -649,14 +648,11 @@ private void configureCheckpointing() {
final ArrayList<MasterTriggerRestoreHook.Factory> hooks = new
ArrayList<>();
for (StreamNode node : streamGraph.getStreamNodes()) {
- 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) {
- hooks.add(new
FunctionMasterCheckpointHookFactory((WithMasterCheckpointHook<?>) f));
- }
+ if (node.getOperatorFactory() instanceof
UdfStreamOperatorFactory) {
+ Function f = ((UdfStreamOperatorFactory)
node.getOperatorFactory()).getOperator().getUserFunction();
Review comment:
Can not we add `getUserFunction()` method to the `UdfStreamOperatorFactory`
interface?
----------------------------------------------------------------
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