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

Xintong Song commented on FLINK-30081:
--------------------------------------

[~liuml07] [~gaoyunhaii],

I think this is indeed a nice improvement. We have a unified calculation logic 
which is used in many different places (RM, TM, etc.). These components are not 
aware of whether they are running in a MiniCluster or not. Thus, to avoid 
potential configuration errors, we set the memory configurations that are not 
supported by MiniCluster to some safe values, if they are not configured, in 
`TaskExecutorResourceUtils#adjustForLocalExecution`. Here we probably should 
override the configurations anyway, regardless they are set or not.

WDYT? And [~liuml07] would you like to work on this?

> Local executor can not accept different jvm-overhead.min/max values
> -------------------------------------------------------------------
>
>                 Key: FLINK-30081
>                 URL: https://issues.apache.org/jira/browse/FLINK-30081
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Configuration
>    Affects Versions: 1.16.0
>            Reporter: Mingliang Liu
>            Priority: Major
>
> In local executor, it's not possible to set different values for 
> {{taskmanager.memory.jvm-overhead.max}} and 
> {{{}taskmanager.memory.jvm-overhead.min{}}}. The same problem for 
> {{taskmanager.memory.network.max}} and {{{}taskmanager.memory.network.min{}}}.
> Sample code to reproduce:
> {code:java}
> Configuration conf = new Configuration();
> conf.setString(TaskManagerOptions.JVM_OVERHEAD_MIN.key(), "1GB");
> conf.setString(TaskManagerOptions.JVM_OVERHEAD_MAX.key(), "2GB");
> StreamExecutionEnvironment.createLocalEnvironment(conf)
>     .fromElements("Hello", "World")
>     .executeAndCollect()
>     .forEachRemaining(System.out::println); {code}
> The failing exception is something like:
> {code:java}
> Exception in thread "main" java.lang.IllegalArgumentException
>   at org.apache.flink.util.Preconditions.checkArgument(Preconditions.java:122)
>   at 
> org.apache.flink.runtime.taskexecutor.TaskExecutorResourceUtils.calculateTotalProcessMemoryFromComponents(TaskExecutorResourceUtils.java:182)
>   at 
> org.apache.flink.runtime.taskexecutor.TaskExecutorMemoryConfiguration.create(TaskExecutorMemoryConfiguration.java:119)
> {code}
> I think the problem was that we expect the max and min to equal, but local 
> executor did not reset them correctly?



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

Reply via email to