You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "lvyanquan (via GitHub)" <gi...@apache.org> on 2024/09/14 02:00:13 UTC

[PR] Flink 36245 [flink]

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

   ## What is the purpose of the change
   
   Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0
   
   ## Brief change log
   
   1. Mark SourceFunction / SinkFunction implementation as Deprecated.
   2. Remove Sink V1 API and relevant usage. 
   
   ## Verifying this change
   
   All test case that used Sink V1 API had been rewritten with Sink V2 API.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): yes (only test scope)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: yes
     - 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
   
   A document to guide user to update SourceFunction with Source API is needed.
   


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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on PR #25331:
URL: https://github.com/apache/flink/pull/25331#issuecomment-2375887294

   @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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "PatrickRen (via GitHub)" <gi...@apache.org>.
PatrickRen commented on code in PR #25331:
URL: https://github.com/apache/flink/pull/25331#discussion_r1778440599


##########
pom.xml:
##########
@@ -2420,6 +2420,10 @@ under the License.
 								<exclude>org.apache.flink.api.java.typeutils.WritableTypeInfo</exclude>
 								<!-- FLINK-36327 Remove dependency about flink-scala and flink-streaming-scala in table module in flink-2.0 -->
 								<exclude>org.apache.flink.table.api.typeutils.*</exclude>
+								<!-- FLINK-36245 Remove SinkV1 API in flink-2.0. -->
+								<exclude>org.apache.flink.streaming.api.scala.DataStream#sinkTo()</exclude>

Review Comment:
   The DataStream Scala API has been removed on master



##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -258,17 +198,7 @@ protected void submitRequestEntries(
      *     method should be called.
      */
     protected void submitRequestEntries(
-            List<RequestEntryT> requestEntries, ResultHandler<RequestEntryT> resultHandler) {
-        submitRequestEntries(
-                requestEntries,
-                requestsToRetry -> {
-                    if (requestsToRetry.isEmpty()) {
-                        resultHandler.complete();
-                    } else {
-                        resultHandler.retryForEntries(requestsToRetry);
-                    }
-                });
-    }
+            List<RequestEntryT> requestEntries, ResultHandler<RequestEntryT> resultHandler) {}

Review Comment:
   This method should throw `UnsupportedOperationException` to keep the same behavior as the previous deprecated method do.



##########
flink-end-to-end-tests/flink-confluent-schema-registry/src/main/java/org/apache/flink/schema/registry/test/TestAvroConsumerConfluent.java:
##########
@@ -85,35 +81,39 @@ public static void main(String[] args) throws Exception {
         SingleOutputStreamOperator<String> mapToString =
                 input.map((MapFunction<User, String>) SpecificRecordBase::toString);
 
-        KafkaSink<String> stringSink =
-                KafkaSink.<String>builder()
-                        .setBootstrapServers(bootstrapServers)
-                        .setRecordSerializer(
-                                KafkaRecordSerializationSchema.builder()
-                                        .setValueSerializationSchema(new SimpleStringSchema())
-                                        .setTopic(parameterTool.getRequired("output-string-topic"))
-                                        .build())
-                        .setKafkaProducerConfig(config)
-                        .build();
-        mapToString.sinkTo(stringSink);
-
-        KafkaSink<User> avroSink =
-                KafkaSink.<User>builder()
-                        .setBootstrapServers(bootstrapServers)
-                        .setRecordSerializer(
-                                KafkaRecordSerializationSchema.builder()
-                                        .setValueSerializationSchema(
-                                                ConfluentRegistryAvroSerializationSchema
-                                                        .forSpecific(
-                                                                User.class,
-                                                                parameterTool.getRequired(
-                                                                        "output-subject"),
-                                                                schemaRegistryUrl))
-                                        .setTopic(parameterTool.getRequired("output-avro-topic"))
-                                        .build())
-                        .build();
-        input.sinkTo(avroSink);
-
-        env.execute("Kafka Confluent Schema Registry AVRO Example");
+        // TODO: [FLINK-36245] Release comments after KafkaSink does not rely on the Depreciated API

Review Comment:
   I don't get the point here. AFAIK Kafka sink is already using the latest Sink V2 API. Why we disable the code here? 
   
   And please don't leave any dead code (commented) here.



##########
flink-walkthroughs/flink-walkthrough-common/pom.xml:
##########
@@ -43,4 +43,74 @@ under the License.
 			<scope>provided</scope>
 		</dependency>
 	</dependencies>
+
+	<build>

Review Comment:
   What is this plugin used for?



##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java:
##########
@@ -1014,8 +1014,8 @@ public DataStreamSink<T> printToErr(String sinkIdentifier) {
      * @param path The path pointing to the location the text file is written to.
      * @return The closed DataStream.
      * @deprecated Please use the {@link
-     *     org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink} explicitly
-     *     using the {@link #addSink(SinkFunction)} method.
+     *     org.apache.flink.streaming.api.functions.sink.filesystem.legacy.StreamingFileSink}
+     *     explicitly using the {@link #addSink(SinkFunction)} method.
      */
     @Deprecated

Review Comment:
   What about removing these methods with deprecation annotation directly, like `writeAsText`, `writeAsCsv` etc.?



##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -281,69 +211,10 @@ protected void submitRequestEntries(
      */
     protected abstract long getSizeInBytes(RequestEntryT requestEntry);
 
-    /**
-     * This method is deprecated, please use the constructor that specifies the {@link
-     * AsyncSinkWriterConfiguration}.
-     */
-    @Deprecated
-    public AsyncSinkWriter(
-            ElementConverter<InputT, RequestEntryT> elementConverter,
-            Sink.InitContext context,
-            int maxBatchSize,
-            int maxInFlightRequests,
-            int maxBufferedRequests,
-            long maxBatchSizeInBytes,
-            long maxTimeInBufferMS,
-            long maxRecordSizeInBytes) {
-        this(
-                elementConverter,
-                context,
-                maxBatchSize,
-                maxInFlightRequests,
-                maxBufferedRequests,
-                maxBatchSizeInBytes,
-                maxTimeInBufferMS,
-                maxRecordSizeInBytes,
-                Collections.emptyList());
-    }
-
-    /**
-     * This method is deprecated, please use the constructor that specifies the {@link
-     * AsyncSinkWriterConfiguration}.
-     */
-    @Deprecated
-    public AsyncSinkWriter(
-            ElementConverter<InputT, RequestEntryT> elementConverter,
-            Sink.InitContext context,
-            int maxBatchSize,
-            int maxInFlightRequests,
-            int maxBufferedRequests,
-            long maxBatchSizeInBytes,
-            long maxTimeInBufferMS,
-            long maxRecordSizeInBytes,
-            Collection<BufferedRequestState<RequestEntryT>> states) {
-        this(
-                elementConverter,
-                context,
-                AsyncSinkWriterConfiguration.builder()
-                        .setMaxBatchSize(maxBatchSize)
-                        .setMaxBatchSizeInBytes(maxBatchSizeInBytes)
-                        .setMaxInFlightRequests(maxInFlightRequests)
-                        .setMaxBufferedRequests(maxBufferedRequests)
-                        .setMaxTimeInBufferMS(maxTimeInBufferMS)
-                        .setMaxRecordSizeInBytes(maxRecordSizeInBytes)
-                        .build(),
-                states);
-    }
-
-    /**
-     * Should be removed along {@link
-     * org.apache.flink.api.connector.sink2.StatefulSink.StatefulSinkWriter}.
-     */
-    @Deprecated
+    /** Should be removed along {@link org.apache.flink.api.connector.sink2.StatefulSinkWriter}. */

Review Comment:
   This comment should be removed.



##########
flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/statemachine/KafkaEventsGeneratorJob.java:
##########
@@ -61,24 +57,25 @@ public static void main(String[] args) throws Exception {
                         Long.MAX_VALUE,
                         RateLimiterStrategy.perSecond(recordsPerSecond),
                         TypeInformation.of(Event.class));
-
-        env.fromSource(
-                        eventGeneratorSource,
-                        WatermarkStrategy.noWatermarks(),
-                        "Events Generator Source")
-                .sinkTo(
-                        KafkaSink.<Event>builder()
-                                .setBootstrapServers(brokers)
-                                .setRecordSerializer(
-                                        KafkaRecordSerializationSchema.builder()
-                                                .setValueSerializationSchema(
-                                                        new EventDeSerializationSchema())
-                                                .setTopic(kafkaTopic)
-                                                .build())
-                                .build());
+        // TODO: [FLINK-36245] Release comments after KafkaSink does not rely on the Depreciated API

Review Comment:
   Same issue as `TestAvroConsumerConfluent`



##########
flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/batch/BatchSink.java:
##########
@@ -73,64 +51,4 @@ public static DataStreamSink<Row> createBatchNoCompactSink(
         sink.getTransformation().setParallelism(parallelism, parallelismConfigured);
         return sink;
     }
-
-    public static <T> DataStreamSink<?> createBatchCompactSink(

Review Comment:
   Why removing this method?
   
   It looks like this method is copy-pasted into `HiveTableSink`. What about we keep the original one and reduce the amount of change?



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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on code in PR #25331:
URL: https://github.com/apache/flink/pull/25331#discussion_r1778809886


##########
flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/batch/BatchSink.java:
##########
@@ -73,64 +51,4 @@ public static DataStreamSink<Row> createBatchNoCompactSink(
         sink.getTransformation().setParallelism(parallelism, parallelismConfigured);
         return sink;
     }
-
-    public static <T> DataStreamSink<?> createBatchCompactSink(

Review Comment:
   done.



##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -281,69 +211,10 @@ protected void submitRequestEntries(
      */
     protected abstract long getSizeInBytes(RequestEntryT requestEntry);
 
-    /**
-     * This method is deprecated, please use the constructor that specifies the {@link
-     * AsyncSinkWriterConfiguration}.
-     */
-    @Deprecated
-    public AsyncSinkWriter(
-            ElementConverter<InputT, RequestEntryT> elementConverter,
-            Sink.InitContext context,
-            int maxBatchSize,
-            int maxInFlightRequests,
-            int maxBufferedRequests,
-            long maxBatchSizeInBytes,
-            long maxTimeInBufferMS,
-            long maxRecordSizeInBytes) {
-        this(
-                elementConverter,
-                context,
-                maxBatchSize,
-                maxInFlightRequests,
-                maxBufferedRequests,
-                maxBatchSizeInBytes,
-                maxTimeInBufferMS,
-                maxRecordSizeInBytes,
-                Collections.emptyList());
-    }
-
-    /**
-     * This method is deprecated, please use the constructor that specifies the {@link
-     * AsyncSinkWriterConfiguration}.
-     */
-    @Deprecated
-    public AsyncSinkWriter(
-            ElementConverter<InputT, RequestEntryT> elementConverter,
-            Sink.InitContext context,
-            int maxBatchSize,
-            int maxInFlightRequests,
-            int maxBufferedRequests,
-            long maxBatchSizeInBytes,
-            long maxTimeInBufferMS,
-            long maxRecordSizeInBytes,
-            Collection<BufferedRequestState<RequestEntryT>> states) {
-        this(
-                elementConverter,
-                context,
-                AsyncSinkWriterConfiguration.builder()
-                        .setMaxBatchSize(maxBatchSize)
-                        .setMaxBatchSizeInBytes(maxBatchSizeInBytes)
-                        .setMaxInFlightRequests(maxInFlightRequests)
-                        .setMaxBufferedRequests(maxBufferedRequests)
-                        .setMaxTimeInBufferMS(maxTimeInBufferMS)
-                        .setMaxRecordSizeInBytes(maxRecordSizeInBytes)
-                        .build(),
-                states);
-    }
-
-    /**
-     * Should be removed along {@link
-     * org.apache.flink.api.connector.sink2.StatefulSink.StatefulSinkWriter}.
-     */
-    @Deprecated
+    /** Should be removed along {@link org.apache.flink.api.connector.sink2.StatefulSinkWriter}. */

Review Comment:
   done.



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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on PR #25331:
URL: https://github.com/apache/flink/pull/25331#issuecomment-2401375174

   > > @lvyanquan Hi, I find some examples under `flink-examples-streaming` cannot work due to the `flink-connector-kafka` version `3.0.0-1.17` still rely on `StatefulSink`. Is this expected?
   > 
   > Yes, this is expected. StatefulSink was marked as Depreciated in 1.19 and removed in 2.0, we need to release a new Kafka connector version quickly after the Flink 2.0-preview release, I've created a jira to trace this https://issues.apache.org/jira/browse/FLINK-36413.
   
   OK, got it.


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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on PR #25331:
URL: https://github.com/apache/flink/pull/25331#issuecomment-2379599167

   > For the ArchTest of connectors, I'm not sure disabling all of them directly is the right solution. If I understand correctly, we need to add those connector classes that violates the rule into the archunit-violations directory.
   
   Thanks for this suggestion, modified according to the suggestion.


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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on PR #25331:
URL: https://github.com/apache/flink/pull/25331#issuecomment-2400340174

   > @lvyanquan Hi, I find some examples under `flink-examples-streaming` cannot work due to the `flink-connector-kafka` version `3.0.0-1.17` still rely on `StatefulSink`. Is this expected?
   
   Yes, this is expected. StatefulSink was marked as Depreciated in 1.19 and removed in 2.0, we need to release a new Kafka connector version quickly after the Flink 2.0-preview release, I've created a jira to trace this https://issues.apache.org/jira/browse/FLINK-36413.


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


Re: [PR] Flink 36245 [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #25331:
URL: https://github.com/apache/flink/pull/25331#issuecomment-2350785089

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cf7930e8dbb764fa146f09f6abce9c0234788761",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "cf7930e8dbb764fa146f09f6abce9c0234788761",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cf7930e8dbb764fa146f09f6abce9c0234788761 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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on code in PR #25331:
URL: https://github.com/apache/flink/pull/25331#discussion_r1778851640


##########
flink-walkthroughs/flink-walkthrough-common/pom.xml:
##########
@@ -43,4 +43,74 @@ under the License.
 			<scope>provided</scope>
 		</dependency>
 	</dependencies>
+
+	<build>

Review Comment:
   Failed to run maven install in flink-walkthrough module because this error
   ```
   Execution default of goal com.github.siom79.japicmp:japicmp-maven-plugin:0.17.1:cmp failed: Could not load 'org.apache.flink.streaming.api.functions.source.FromIteratorFunction': org.apache.flink.streaming.api.functions.source.FromIteratorFunction. Please make sure that all libraries have been added to the classpath 
   ```
   However, adding `org.apache.flink.streaming.api.functions.source.FromIteratorFunction` to exclude in japicmp-maven-plugin of parent pom did not have an effect.



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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on code in PR #25331:
URL: https://github.com/apache/flink/pull/25331#discussion_r1779840479


##########
flink-end-to-end-tests/flink-confluent-schema-registry/src/main/java/org/apache/flink/schema/registry/test/TestAvroConsumerConfluent.java:
##########
@@ -85,35 +81,39 @@ public static void main(String[] args) throws Exception {
         SingleOutputStreamOperator<String> mapToString =
                 input.map((MapFunction<User, String>) SpecificRecordBase::toString);
 
-        KafkaSink<String> stringSink =
-                KafkaSink.<String>builder()
-                        .setBootstrapServers(bootstrapServers)
-                        .setRecordSerializer(
-                                KafkaRecordSerializationSchema.builder()
-                                        .setValueSerializationSchema(new SimpleStringSchema())
-                                        .setTopic(parameterTool.getRequired("output-string-topic"))
-                                        .build())
-                        .setKafkaProducerConfig(config)
-                        .build();
-        mapToString.sinkTo(stringSink);
-
-        KafkaSink<User> avroSink =
-                KafkaSink.<User>builder()
-                        .setBootstrapServers(bootstrapServers)
-                        .setRecordSerializer(
-                                KafkaRecordSerializationSchema.builder()
-                                        .setValueSerializationSchema(
-                                                ConfluentRegistryAvroSerializationSchema
-                                                        .forSpecific(
-                                                                User.class,
-                                                                parameterTool.getRequired(
-                                                                        "output-subject"),
-                                                                schemaRegistryUrl))
-                                        .setTopic(parameterTool.getRequired("output-avro-topic"))
-                                        .build())
-                        .build();
-        input.sinkTo(avroSink);
-
-        env.execute("Kafka Confluent Schema Registry AVRO Example");
+        // TODO: [FLINK-36245] Release comments after KafkaSink does not rely on the Depreciated API

Review Comment:
   done.
   Skip compile this class instead of adding deadcode.



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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on code in PR #25331:
URL: https://github.com/apache/flink/pull/25331#discussion_r1778847740


##########
flink-end-to-end-tests/flink-confluent-schema-registry/src/main/java/org/apache/flink/schema/registry/test/TestAvroConsumerConfluent.java:
##########
@@ -85,35 +81,39 @@ public static void main(String[] args) throws Exception {
         SingleOutputStreamOperator<String> mapToString =
                 input.map((MapFunction<User, String>) SpecificRecordBase::toString);
 
-        KafkaSink<String> stringSink =
-                KafkaSink.<String>builder()
-                        .setBootstrapServers(bootstrapServers)
-                        .setRecordSerializer(
-                                KafkaRecordSerializationSchema.builder()
-                                        .setValueSerializationSchema(new SimpleStringSchema())
-                                        .setTopic(parameterTool.getRequired("output-string-topic"))
-                                        .build())
-                        .setKafkaProducerConfig(config)
-                        .build();
-        mapToString.sinkTo(stringSink);
-
-        KafkaSink<User> avroSink =
-                KafkaSink.<User>builder()
-                        .setBootstrapServers(bootstrapServers)
-                        .setRecordSerializer(
-                                KafkaRecordSerializationSchema.builder()
-                                        .setValueSerializationSchema(
-                                                ConfluentRegistryAvroSerializationSchema
-                                                        .forSpecific(
-                                                                User.class,
-                                                                parameterTool.getRequired(
-                                                                        "output-subject"),
-                                                                schemaRegistryUrl))
-                                        .setTopic(parameterTool.getRequired("output-avro-topic"))
-                                        .build())
-                        .build();
-        input.sinkTo(avroSink);
-
-        env.execute("Kafka Confluent Schema Registry AVRO Example");
+        // TODO: [FLINK-36245] Release comments after KafkaSink does not rely on the Depreciated API

Review Comment:
   Actually, KafkaSink implements StatefulSink/TwoPhaseCommittingSink, these two APIs were removed in current version and will be replaced by SupportsWriterState/SupportsCommitter.
   If this code is kept, it will result in unsuccessful compilation.



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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on code in PR #25331:
URL: https://github.com/apache/flink/pull/25331#discussion_r1779853827


##########
flink-walkthroughs/flink-walkthrough-common/pom.xml:
##########
@@ -43,4 +43,74 @@ under the License.
 			<scope>provided</scope>
 		</dependency>
 	</dependencies>
+
+	<build>

Review Comment:
   Thanks for pointting out this, removed this unnecessary change and fixed it in flink-parent pom.



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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on code in PR #25331:
URL: https://github.com/apache/flink/pull/25331#discussion_r1778837890


##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java:
##########
@@ -1014,8 +1014,8 @@ public DataStreamSink<T> printToErr(String sinkIdentifier) {
      * @param path The path pointing to the location the text file is written to.
      * @return The closed DataStream.
      * @deprecated Please use the {@link
-     *     org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink} explicitly
-     *     using the {@link #addSink(SinkFunction)} method.
+     *     org.apache.flink.streaming.api.functions.sink.filesystem.legacy.StreamingFileSink}
+     *     explicitly using the {@link #addSink(SinkFunction)} method.
      */
     @Deprecated

Review Comment:
   done.



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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on code in PR #25331:
URL: https://github.com/apache/flink/pull/25331#discussion_r1778810353


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -258,17 +198,7 @@ protected void submitRequestEntries(
      *     method should be called.
      */
     protected void submitRequestEntries(
-            List<RequestEntryT> requestEntries, ResultHandler<RequestEntryT> resultHandler) {
-        submitRequestEntries(
-                requestEntries,
-                requestsToRetry -> {
-                    if (requestsToRetry.isEmpty()) {
-                        resultHandler.complete();
-                    } else {
-                        resultHandler.retryForEntries(requestsToRetry);
-                    }
-                });
-    }
+            List<RequestEntryT> requestEntries, ResultHandler<RequestEntryT> resultHandler) {}

Review Comment:
   done.



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


Re: [PR] [Flink 36245] Remove legacy SourceFunction / SinkFunction / Sink V1 API in 2.0 [flink]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on PR #25331:
URL: https://github.com/apache/flink/pull/25331#issuecomment-2367194793

   Hi @PatrickRen, could you please help to review this as I'm not really familiar with the API norms.


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