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/10/27 14:08:52 UTC

[GitHub] [flink] Aitozi opened a new pull request, #21174: [FLINK-29557] Fix the SinkOperator with OutputFormatFunction is ignor…

Aitozi opened a new pull request, #21174:
URL: https://github.com/apache/flink/pull/21174

   …ed as InputFormatOperator
   
   ## What is the purpose of the change
   
   This pr is meant to fix the `SinkOperator` with `OutputFormatFunction` is not recognized as `InputFormatOperator`
   
   ## Brief change log
   
     - Add a new interface `SinkFunctionOperator` and let the `SinkOperator` and `StreamSink` extend from it
     - Check for `SinkFunctionOperator#sinkFunction` in the `SimpleOperatorFactory`
   
   
   ## Verifying this change
   
   This change added tests and can be verified by `SinkOperatorTest`
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
   


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


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

Posted by GitBox <gi...@apache.org>.
Aitozi commented on PR #21174:
URL: https://github.com/apache/flink/pull/21174#issuecomment-1302869573

   The CI failure seems unrelated 
   
   > Caused by: org.apache.kafka.common.errors.TopicExistsException: Topic 'partition_failure_recovery_EventTime' already exists.


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


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

Posted by GitBox <gi...@apache.org>.
Aitozi commented on code in PR #21174:
URL: https://github.com/apache/flink/pull/21174#discussion_r1012761649


##########
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:
   I have fix your comments, please take a look again @gaoyunhaii 



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


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

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #21174:
URL: https://github.com/apache/flink/pull/21174#issuecomment-1293598604

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e64c2f57fdb22217e586da40bc92f69d0376e03d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e64c2f57fdb22217e586da40bc92f69d0376e03d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e64c2f57fdb22217e586da40bc92f69d0376e03d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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


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

Posted by GitBox <gi...@apache.org>.
Aitozi commented on PR #21174:
URL: https://github.com/apache/flink/pull/21174#issuecomment-1294495106

   Hi @gaoyunhaii , can you help me understand the CI failure? 
   
   > [ERROR] Failed to execute goal io.github.zentol.japicmp:japicmp-maven-plugin:0.16.0_m325:cmp (default) on project flink-core: There is at least one incompatibility: org.apache.flink.api.connector.source.SourceReader.pauseOrResumeSplits(java.util.Collection,java.util.Collection):METHOD_NEW_DEFAULT -> [Help 1]
   
   The reported method seems not related to this PR, a little confused for the result 😖


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


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

Posted by GitBox <gi...@apache.org>.
Aitozi commented on PR #21174:
URL: https://github.com/apache/flink/pull/21174#issuecomment-1294497007

   Maybe it's caused by this: https://issues.apache.org/jira/browse/FLINK-29787


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


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

Posted by GitBox <gi...@apache.org>.
Aitozi commented on code in PR #21174:
URL: https://github.com/apache/flink/pull/21174#discussion_r1012711061


##########
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:
   Good idea!



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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on PR #21174:
URL: https://github.com/apache/flink/pull/21174#issuecomment-1314950635

   @flinkbot run azure


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


[GitHub] [flink] gaoyunhaii closed pull request #21174: [FLINK-29557] Fix the SinkOperator with OutputFormatFunction is ignor…

Posted by GitBox <gi...@apache.org>.
gaoyunhaii closed pull request #21174: [FLINK-29557] Fix the SinkOperator with OutputFormatFunction is ignor…
URL: https://github.com/apache/flink/pull/21174


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