You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "vinoyang (Jira)" <ji...@apache.org> on 2019/11/14 08:58:00 UTC
[jira] [Commented] (FLINK-14748) Migrate duration and memory size
related ConfigOptions to typed options
[ https://issues.apache.org/jira/browse/FLINK-14748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974050#comment-16974050 ]
vinoyang commented on FLINK-14748:
----------------------------------
Hi [~dwysakowicz] Can I help to do this work?
> 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}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)