[
https://issues.apache.org/jira/browse/FLINK-20879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
godfrey he updated FLINK-20879:
-------------------------------
Description:
Currently, There are memory ConfigOptions in ExecutionConfigOptions such as
{{table.exec.resource.external-buffer-memory}},
{{table.exec.resource.hash-agg.memory}}. They are all {{String}} type now.
While when we need to get the memory size value, the String value should be
converted to {{MemorySize}} type and then getting bytes value. Code likes:
{code:java}
val memoryBytes = MemorySize.parse(config.getConfiguration.getString(
ExecutionConfigOptions.TABLE_EXEC_RESOURCE_HASH_AGG_MEMORY)).getBytes
{code}
The above code can be simplified if we change the {{ConfigOption}} type from
{{String}} to {{MemorySize}} type. Many runtime {{ConfigOption}}s also use
{{MemorySize}} type to define memory config. So I suggest we use {{MemorySize}}
type instead of {{String}} type for memory {{ConfigOption}} in
{{ExecutionConfigOptions}}.
Note: this is an incompatible change.
was:
Currently, There are memory {{ConfigOption}}s in {{ExecutionConfigOption}}s
such as {{table.exec.resource.external-buffer-memory}},
{{table.exec.resource.hash-agg.memory}}. They are all {{String}} type now.
While when we need to get the memory size value, the String value should be
converted to {{MemorySize}} type and then getting bytes value. Code likes:
{code:java}
val memoryBytes = MemorySize.parse(config.getConfiguration.getString(
ExecutionConfigOptions.TABLE_EXEC_RESOURCE_HASH_AGG_MEMORY)).getBytes
{code}
The above code can be simplified if we change the {{ConfigOption}} type from
{{String}} to {{MemorySize}} type. Many runtime {{ConfigOption}}s also use
{{MemorySize}} type to define memory config. So I suggest we use {{MemorySize}}
type instead of {{String}} type for memory {{ConfigOption}} in
{{ExecutionConfigOptions}}.
Note: this is an incompatible change.
> Use MemorySize type instead of String type for memory ConfigOption in
> ExecutionConfigOptions
> --------------------------------------------------------------------------------------------
>
> Key: FLINK-20879
> URL: https://issues.apache.org/jira/browse/FLINK-20879
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Reporter: godfrey he
> Priority: Major
> Fix For: 1.13.0
>
>
> Currently, There are memory ConfigOptions in ExecutionConfigOptions such as
> {{table.exec.resource.external-buffer-memory}},
> {{table.exec.resource.hash-agg.memory}}. They are all {{String}} type now.
> While when we need to get the memory size value, the String value should be
> converted to {{MemorySize}} type and then getting bytes value. Code likes:
> {code:java}
> val memoryBytes = MemorySize.parse(config.getConfiguration.getString(
> ExecutionConfigOptions.TABLE_EXEC_RESOURCE_HASH_AGG_MEMORY)).getBytes
> {code}
> The above code can be simplified if we change the {{ConfigOption}} type from
> {{String}} to {{MemorySize}} type. Many runtime {{ConfigOption}}s also use
> {{MemorySize}} type to define memory config. So I suggest we use
> {{MemorySize}} type instead of {{String}} type for memory {{ConfigOption}} in
> {{ExecutionConfigOptions}}.
> Note: this is an incompatible change.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)