[jira] [Commented] (FLINK-32619) ConfigOptions to support fallback configuration

2023-07-19 Thread Hong Liang Teoh (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17744606#comment-17744606
 ] 

Hong Liang Teoh commented on FLINK-32619:
-

That's a great callout [~wangm92] . Will use that instead and close this JIRA

> ConfigOptions to support fallback configuration
> ---
>
> Key: FLINK-32619
> URL: https://issues.apache.org/jira/browse/FLINK-32619
> Project: Flink
>  Issue Type: Technical Debt
>  Components: Runtime / Configuration
>Affects Versions: 1.16.2, 1.17.1
>Reporter: Hong Liang Teoh
>Priority: Minor
>
> ConfigOptions has no option to specify a "fallback configuration" as the 
> default.
>  
> For example, if we want {{rest.cache.checkpoint-statistics.timeout}} to 
> fallback to web.refresh-interval instead of a static default value, we have 
> to specify
>  
> {code:java}
> @Documentation.OverrideDefault("web.refresh-interval")
> @Documentation.Section(Documentation.Sections.EXPERT_REST)
> public static final ConfigOption 
> CACHE_CHECKPOINT_STATISTICS_TIMEOUT =
> key("rest.cache.checkpoint-statistics.timeout")
> .durationType()
> .noDefaultValue()
> .withDescription(
> "");
>  {code}
>  
>  
> The {{.noDefault()}} is misleading as it actually has a default.
>  
> We should introduce a {{.fallbackConfiguration()}} that is handled gracefully 
> by doc generators.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FLINK-32619) ConfigOptions to support fallback configuration

2023-07-18 Thread Matt Wang (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-32619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17744413#comment-17744413
 ] 

Matt Wang commented on FLINK-32619:
---

hi, i saw flink  has supported this, like this:
{code:java}
/** Timeout for identifying inactive slots. */
@Documentation.Section(Documentation.Sections.ALL_TASK_MANAGER)
public static final ConfigOption SLOT_TIMEOUT =
key("taskmanager.slot.timeout")
.durationType()
.defaultValue(AkkaOptions.ASK_TIMEOUT_DURATION.defaultValue())
.withFallbackKeys(AkkaOptions.ASK_TIMEOUT_DURATION.key())
.withDescription(
Description.builder()
.text(
"Timeout used for identifying inactive 
slots. The TaskManager will free the slot if it does not become active "
+ "within the given amount of 
time. Inactive slots can be caused by an out-dated slot request. If no "
+ "value is configured, then it 
will fall back to %s.",

code(AkkaOptions.ASK_TIMEOUT_DURATION.key()))
.build()); {code}

> ConfigOptions to support fallback configuration
> ---
>
> Key: FLINK-32619
> URL: https://issues.apache.org/jira/browse/FLINK-32619
> Project: Flink
>  Issue Type: Technical Debt
>  Components: Runtime / Configuration
>Affects Versions: 1.16.2, 1.17.1
>Reporter: Hong Liang Teoh
>Priority: Minor
>
> ConfigOptions has no option to specify a "fallback configuration" as the 
> default.
>  
> For example, if we want {{rest.cache.checkpoint-statistics.timeout}} to 
> fallback to web.refresh-interval instead of a static default value, we have 
> to specify
>  
> {code:java}
> @Documentation.OverrideDefault("web.refresh-interval")
> @Documentation.Section(Documentation.Sections.EXPERT_REST)
> public static final ConfigOption 
> CACHE_CHECKPOINT_STATISTICS_TIMEOUT =
> key("rest.cache.checkpoint-statistics.timeout")
> .durationType()
> .noDefaultValue()
> .withDescription(
> "");
>  {code}
>  
>  
> The {{.noDefault()}} is misleading as it actually has a default.
>  
> We should introduce a {{.fallbackConfiguration()}} that is handled gracefully 
> by doc generators.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)