[
https://issues.apache.org/jira/browse/FLINK-14748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dawid Wysakowicz updated FLINK-14748:
-------------------------------------
Description:
The goal of this task is to migrate ConfigOptions that describe intervals or
memory sizes to the typed ConfigOptions. We should also regenerate the
documentation after migrating.
Example:
{code}
public static final ConfigOption<String> RESTART_STRATEGY_FAILURE_RATE_DELAY =
ConfigOptions
.key("restart-strategy.failure-rate.delay")
.defaultValue("1 s")
.withDescription(...);
{code}
should become
{code}
public static final ConfigOption<Duration> RESTART_STRATEGY_FAILURE_RATE_DELAY
= ConfigOptions
.key("restart-strategy.failure-rate.delay")
.durationType()
.defaultValue(Duration.ofSeconds(1))
.withDescription(...);
{code}
We should also migrate other types whenever possible.
For example we should migrate:
{code}
public static final ConfigOption<Integer> CONNECT_TIMEOUT =
key("blob.client.connect.timeout")
.defaultValue(0)
.withDescription("The connection timeout in
milliseconds for the blob client.");
{code}
but we should not migrate, because it is expressed in seconds which is not the
default unit:
{code}
public static final ConfigOption<Long> CLEANUP_INTERVAL =
key("blob.service.cleanup.interval")
.defaultValue(3_600L) // once per hour
.withDeprecatedKeys("library-cache-manager.cleanup.interval")
.withDescription("Cleanup interval of the blob caches
at the task managers (in seconds).");
{code}
*NOTE:* We should retain and deprecate the existing fields and add new options
with the intended type as they are all annotated with {{@PublicEvolving}}.
was:
The goal of this task is to migrate ConfigOptions that describe intervals or
memory sizes to the typed ConfigOptions. We should also regenerate the
documentation after migrating.
Example:
{code}
public static final ConfigOption<String> RESTART_STRATEGY_FAILURE_RATE_DELAY =
ConfigOptions
.key("restart-strategy.failure-rate.delay")
.defaultValue("1 s")
.withDescription(...);
{code}
should become
{code}
public static final ConfigOption<Duration> RESTART_STRATEGY_FAILURE_RATE_DELAY
= ConfigOptions
.key("restart-strategy.failure-rate.delay")
.durationType()
.defaultValue(Duration.ofSeconds(1))
.withDescription(...);
{code}
We should also migrate other types whenever possible.
For example we should migrate:
{code}
public static final ConfigOption<Integer> CONNECT_TIMEOUT =
key("blob.client.connect.timeout")
.defaultValue(0)
.withDescription("The connection timeout in
milliseconds for the blob client.");
{code}
but we should not migrate, because it is expressed in seconds which is not the
default unit:
{code}
public static final ConfigOption<Long> CLEANUP_INTERVAL =
key("blob.service.cleanup.interval")
.defaultValue(3_600L) // once per hour
.withDeprecatedKeys("library-cache-manager.cleanup.interval")
.withDescription("Cleanup interval of the blob caches
at the task managers (in seconds).");
{code}
> Migrate duration and memory size related ConfigOptions to typed options
> -----------------------------------------------------------------------
>
> Key: FLINK-14748
> URL: https://issues.apache.org/jira/browse/FLINK-14748
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Configuration
> Reporter: Dawid Wysakowicz
> Priority: Major
>
> The goal of this task is to migrate ConfigOptions that describe intervals or
> memory sizes to the typed ConfigOptions. We should also regenerate the
> documentation after migrating.
> Example:
> {code}
> public static final ConfigOption<String> RESTART_STRATEGY_FAILURE_RATE_DELAY
> = ConfigOptions
> .key("restart-strategy.failure-rate.delay")
> .defaultValue("1 s")
> .withDescription(...);
> {code}
> should become
> {code}
> public static final ConfigOption<Duration>
> RESTART_STRATEGY_FAILURE_RATE_DELAY = ConfigOptions
> .key("restart-strategy.failure-rate.delay")
> .durationType()
> .defaultValue(Duration.ofSeconds(1))
> .withDescription(...);
> {code}
> We should also migrate other types whenever possible.
> For example we should migrate:
> {code}
> public static final ConfigOption<Integer> CONNECT_TIMEOUT =
> key("blob.client.connect.timeout")
> .defaultValue(0)
> .withDescription("The connection timeout in
> milliseconds for the blob client.");
> {code}
> but we should not migrate, because it is expressed in seconds which is not
> the default unit:
> {code}
> public static final ConfigOption<Long> CLEANUP_INTERVAL =
> key("blob.service.cleanup.interval")
> .defaultValue(3_600L) // once per hour
>
> .withDeprecatedKeys("library-cache-manager.cleanup.interval")
> .withDescription("Cleanup interval of the blob caches
> at the task managers (in seconds).");
> {code}
> *NOTE:* We should retain and deprecate the existing fields and add new
> options with the intended type as they are all annotated with
> {{@PublicEvolving}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)