Skip to content

Commit 21d07b7

Browse files
committed
[FLINK-36177] Deprecate KafkaShuffle and more
This commit deprecates all classes that are slated for removal in the kafka-4.0 release compatible with Flink 2.0. I also deprecated internal classes to make later removal easier. Some public classes will cease to be public API but are still internally used.
1 parent 9b97c51 commit 21d07b7

File tree

44 files changed

+78
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+78
-2
lines changed

flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaDeserializationSchemaWrapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
* ConsumerRecord ConsumerRecords}.
3434
*
3535
* @param <T> the type of the deserialized records.
36+
* @deprecated Remove with @{@link KafkaDeserializationSchema}
3637
*/
38+
@Deprecated
3739
class KafkaDeserializationSchemaWrapper<T> implements KafkaRecordDeserializationSchema<T> {
3840
private static final long serialVersionUID = 1L;
3941
private final KafkaDeserializationSchema<T> kafkaDeserializationSchema;

flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchema.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ default void open(DeserializationSchema.InitializationContext context) throws Ex
7171
* @param <V> the return type of the deserialized record.
7272
* @return A {@link KafkaRecordDeserializationSchema} that uses the given {@link
7373
* KafkaDeserializationSchema} to deserialize the {@link ConsumerRecord ConsumerRecords}.
74+
* @deprecated Will be removed with {@link KafkaDeserializationSchema}.
7475
*/
76+
@Deprecated
7577
static <V> KafkaRecordDeserializationSchema<V> of(
7678
KafkaDeserializationSchema<V> kafkaDeserializationSchema) {
7779
return new KafkaDeserializationSchemaWrapper<>(kafkaDeserializationSchema);

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
* @param <T> The type of records produced by this data source
9191
*/
9292
@Internal
93+
@Deprecated
9394
public abstract class FlinkKafkaConsumerBase<T> extends RichParallelSourceFunction<T>
9495
implements CheckpointListener, ResultTypeQueryable<T>, CheckpointedFunction {
9596

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaErrorCode.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@
1919

2020
import org.apache.flink.annotation.PublicEvolving;
2121

22-
/** Error codes used in {@link FlinkKafkaException}. */
22+
/**
23+
* Error codes used in {@link FlinkKafkaException}.
24+
*
25+
* @deprecated Will be removed with {@link FlinkKafkaProducer} and {@link
26+
* org.apache.flink.streaming.connectors.kafka.shuffle.FlinkKafkaShuffle}.
27+
*/
2328
@PublicEvolving
29+
@Deprecated
2430
public enum FlinkKafkaErrorCode {
2531
PRODUCERS_POOL_EMPTY,
2632
EXTERNAL_ERROR

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaException.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@
2020
import org.apache.flink.annotation.PublicEvolving;
2121
import org.apache.flink.util.FlinkException;
2222

23-
/** Exception used by {@link FlinkKafkaProducer} and {@link FlinkKafkaConsumer}. */
23+
/**
24+
* Exception used by {@link FlinkKafkaProducer} and {@link FlinkKafkaConsumer}.
25+
*
26+
* @deprecated Will be removed with {@link FlinkKafkaProducer} and {@link
27+
* org.apache.flink.streaming.connectors.kafka.shuffle.FlinkKafkaShuffle}.
28+
*/
2429
@PublicEvolving
30+
@Deprecated
2531
public class FlinkKafkaException extends FlinkException {
2632

2733
private static final long serialVersionUID = 920269130311214200L;

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaContextAware.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
*
2727
* <p>You only need to override the methods for the information that you need. However, {@link
2828
* #getTargetTopic(Object)} is required because it is used to determine the available partitions.
29+
*
30+
* @deprecated Will be turned into internal API when {@link FlinkKafkaProducer} is removed.
2931
*/
3032
@PublicEvolving
33+
@Deprecated
3134
public interface KafkaContextAware<T> {
3235

3336
/**

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaDeserializationSchema.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
* (Java/Scala objects) that are processed by Flink.
3232
*
3333
* @param <T> The type created by the keyed deserialization schema.
34+
* @deprecated Will be turned into internal API when {@link FlinkKafkaConsumer} is removed.
3435
*/
3536
@PublicEvolving
37+
@Deprecated
3638
public interface KafkaDeserializationSchema<T> extends Serializable, ResultTypeQueryable<T> {
3739

3840
/**

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaSerializationSchema.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
* which the Kafka Producer is running.
3636
*
3737
* @param <T> the type of values being serialized
38+
* @deprecated Will be turned into internal API when {@link FlinkKafkaProducer} is removed.
3839
*/
3940
@PublicEvolving
41+
@Deprecated
4042
public interface KafkaSerializationSchema<T> extends Serializable {
4143

4244
/**

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/config/OffsetCommitMode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* <p>The exact value of this is determined at runtime in the consumer subtasks.
2727
*/
2828
@Internal
29+
@Deprecated
2930
public enum OffsetCommitMode {
3031

3132
/** Completely disable offset committing. */

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/config/OffsetCommitModes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
/** Utilities for {@link OffsetCommitMode}. */
2323
@Internal
24+
@Deprecated
2425
public class OffsetCommitModes {
2526

2627
/**

0 commit comments

Comments
 (0)