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

Jark Wu closed FLINK-20879.
---------------------------
    Resolution: Fixed

Fixed in master: bfb8d6866f5a19a12a1a7e46ff0fe615110a7fd6

> 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
>              Labels: pull-request-available
>             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)

Reply via email to