You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2021/01/12 08:23:00 UTC

[jira] [Assigned] (FLINK-20879) Use MemorySize type instead of String type for memory ConfigOption in ExecutionConfigOptions

     [ https://issues.apache.org/jira/browse/FLINK-20879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jark Wu reassigned FLINK-20879:
-------------------------------

    Assignee: jiawen xiao

> 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
>            Assignee: jiawen xiao
>            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)