1996fanrui commented on code in PR #22984:
URL: https://github.com/apache/flink/pull/22984#discussion_r1440283481
##########
flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfig.java:
##########
@@ -53,13 +54,14 @@ public class StateTtlConfig implements Serializable {
private static final long serialVersionUID = -7592693245044289793L;
public static final StateTtlConfig DISABLED =
- newBuilder(Time.milliseconds(Long.MAX_VALUE))
+ newBuilder(Duration.ofMillis(Long.MAX_VALUE))
.setUpdateType(UpdateType.Disabled)
.build();
/**
* This option value configures when to update last access timestamp which
prolongs state TTL.
*/
+ @PublicEvolving
Review Comment:
nit: The public class `StateTtlConfig` is `PublicEvolving`, do we need to
mark all internal class as well?
IIUC, all public internal class or fields are `PublicEvolving` if public
class is `PublicEvolving`, right?
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java:
##########
@@ -810,7 +811,8 @@ public RestartStrategies.RestartStrategyConfiguration
getRestartStrategy() {
* @param numberOfExecutionRetries The number of times the system will try
to re-execute failed
* tasks.
* @deprecated This method will be replaced by {@link
#setRestartStrategy}. The {@link
- * RestartStrategies#fixedDelayRestart(int, Time)} contains the number
of execution retries.
+ * RestartStrategies#fixedDelayRestart(int, Duration)} contains the
number of execution
+ * retries.
Review Comment:
Not needed as well
##########
flink-core/src/main/java/org/apache/flink/api/common/restartstrategy/RestartStrategies.java:
##########
@@ -72,9 +72,23 @@ public static RestartStrategyConfiguration fixedDelayRestart(
* @param restartAttempts Number of restart attempts for the
FixedDelayRestartStrategy
* @param delayInterval Delay in-between restart attempts for the
FixedDelayRestartStrategy
* @return FixedDelayRestartStrategy
+ * @deprecated Use {@link #fixedDelayRestart(int, Duration)}
*/
+ @Deprecated
Review Comment:
IIUC, we don't need to change this class.
The whole `RestartStrategies` class has been marked as `Deprecated` in the
master branch.
##########
flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfig.java:
##########
@@ -121,6 +125,10 @@ public StateVisibility getStateVisibility() {
@Nonnull
Review Comment:
```suggestion
/** @deprecated Use {@link #getTimeToLive()} */
@Deprecated
@Nonnull
```
--
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]