JingGe commented on code in PR #23758:
URL: https://github.com/apache/flink/pull/23758#discussion_r1399351523
##########
flink-core/src/main/java/org/apache/flink/api/common/restartstrategy/RestartStrategies.java:
##########
@@ -111,7 +118,17 @@ public static ExponentialDelayRestartStrategyConfiguration
exponentialDelayResta
initialBackoff, maxBackoff, backoffMultiplier,
resetBackoffThreshold, jitterFactor);
}
- /** Abstract configuration for restart strategies. */
+ /**
+ * Abstract configuration for restart strategies.
+ *
+ * @deprecated The {@link RestartStrategyConfiguration} class is marked as
deprecated because
+ * starting from Flink 1.19, all complex Java objects related to
configuration should be
+ * replaced by ConfigOption. In a future major version of Flink, this
class will be removed
+ * entirely. It is recommended to switch to using the ConfigOptions
provided by {@link
+ * org.apache.flink.configuration.RestartStrategyOptions} for
configuring restart
+ * strategies.
+ */
+ @Deprecated
Review Comment:
Since the whole class is marked as deprecated, do we still need to
deprecated these methods?
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java:
##########
@@ -663,10 +663,16 @@ public CheckpointingMode getCheckpointingMode() {
* org.apache.flink.runtime.state.CheckpointStorage} which configures how
and where state
* backends persist during a checkpoint.
*
+ * @deprecated The method is marked as deprecated because starting from
Flink 1.19, the usage of
+ * all complex Java objects related to configuration, including their
getter and setter
+ * methods, should be replaced by ConfigOption. In a future major
version of Flink, this
+ * method will be removed entirely. It is recommended to switch to
using the ConfigOptions
+ * provided for configuring state backend.
Review Comment:
I would suggest adding sample code to help users know how to use
ConfigOption instead
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/CheckpointConfig.java:
##########
@@ -759,9 +765,15 @@ public void setCheckpointStorage(CheckpointStorage
storage) {
* Configures the application to write out checkpoint snapshots to the
configured directory. See
* {@link FileSystemCheckpointStorage} for more details on checkpointing
to a file system.
*
+ * @deprecated The method is marked as deprecated because starting from
Flink 1.19, the usage of
+ * all complex Java objects related to configuration, including their
getter and setter
+ * methods, should be replaced by ConfigOption. In a future major
version of Flink, this
Review Comment:
There many methods in CheckpointConfig. When should use ConfigOption and
when should use CheckpointConfig directly?
--
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]