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 2022/11/03 07:23:08 UTC

[GitHub] [flink] gaoyunhaii commented on a diff in pull request #21174: [FLINK-29557] Fix the SinkOperator with OutputFormatFunction is ignor…

gaoyunhaii commented on code in PR #21174:
URL: https://github.com/apache/flink/pull/21174#discussion_r1012522367


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/SinkFunctionOperator.java:
##########
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.flink.streaming.api.operators;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.streaming.api.functions.sink.SinkFunction;
+
+/**
+ * The abstract sink operator with sink function.
+ *
+ * @param <IN>
+ */
+@Internal
+public abstract class SinkFunctionOperator<IN>

Review Comment:
   Would it be better to make it to be an interface with a method of `getUserFunction()`? The benefit to me is that we do not need to change the inheritance hierarchy for the two implementation classes, if in the future they have new requirements that they have to extends some other abstract class, they will be easy to achieve that. 



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org