1996fanrui commented on code in PR #23550:
URL: https://github.com/apache/flink/pull/23550#discussion_r1371912000


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamConfig.java:
##########
@@ -368,7 +373,8 @@ public void setStreamOperator(StreamOperator<?> operator) {
 
     public void setStreamOperatorFactory(StreamOperatorFactory<?> factory) {
         if (factory != null) {
-            toBeSerializedConfigObjects.put(SERIALIZEDUDF, factory);
+            toBeSerializedConfigObjects.put(SERIALIZED_UDF, factory);
+            config.setString(SERIALIZED_UDF_CLASS_NAME, 
factory.getClass().getName());

Review Comment:
   Sorry @pnowojski , I misunderstood your solution1 before. I think I got it 
now.
   
   Let me express my understand:
   1. We still check the class name
   2. We added a check to prevent adding a sub class for 
SinkWriterOperatorFactory in the future.
   
   If it will be added in the future, this check will throw exception, and 
correponding developer will find it, right?
   
   If so, I think it's fine, and it's better to add some comments to explain 
why.
   
   Also, how about just adding the solution 1 to master branch? 1.17 and 1.18 
don't merge new feature, and cuuerntly it's final class, so it's should be safe 
for 1.17 and 1.18.
   
   I will go ahead with solution1, thanks again for your suggestion and patient.



-- 
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]

Reply via email to