dawidwys commented on a change in pull request #10191: [FLINK-14749] Migrate
duration and memory size ConfigOptions in JobManagerOptions
URL: https://github.com/apache/flink/pull/10191#discussion_r346284664
##########
File path:
flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
##########
@@ -80,19 +80,21 @@
* JVM heap size for the JobManager with memory size.
*/
@Documentation.CommonOption(position =
Documentation.CommonOption.POSITION_MEMORY)
- public static final ConfigOption<String> JOB_MANAGER_HEAP_MEMORY =
+ public static final ConfigOption<MemorySize> JOB_MANAGER_HEAP_MEMORY =
key("jobmanager.heap.size")
- .defaultValue("1024m")
+ .memoryType()
+ .defaultValue(MemorySize.parse("1024m"))
.withDescription("JVM heap size for the JobManager.");
/**
* JVM heap size (in megabytes) for the JobManager.
* @deprecated use {@link #JOB_MANAGER_HEAP_MEMORY}
*/
@Deprecated
- public static final ConfigOption<Integer> JOB_MANAGER_HEAP_MEMORY_MB =
+ public static final ConfigOption<MemorySize> JOB_MANAGER_HEAP_MEMORY_MB
=
Review comment:
This option cannot be migrated. It uses different default unit.
Consider :
```
jobmanager.heap.mb= 1024
```
User expects the heap size be configured to 1024 **mb**. After your change
it will be parsed as 1024 **b**. I also tried to explain that in the
description of the issue. Please take attention to such things.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services