Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5726#discussion_r175701852
  
    --- Diff: 
flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java ---
    @@ -476,6 +477,11 @@ public ApplicationId getClusterId(CommandLine 
commandLine) {
        public ClusterSpecification getClusterSpecification(CommandLine 
commandLine) throws FlinkException {
                final Configuration effectiveConfiguration = 
applyCommandLineOptionsToConfiguration(commandLine);
     
    +           // aim to check the parameters
    +           ContaineredTaskManagerParameters.create(
    +                   effectiveConfiguration,
    +                   
effectiveConfiguration.getInteger(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY), 
1);
    --- End diff --
    
    I think we should pull the verification logic out of the 
`ContaineredTaskManagerParameters#create` method and place it somewhere else. I 
would also suggest to move this check to 
`AbstractYarnClusterDescriptor#deployInternal` and use the provided 
`ClusterSpecification#getTaskManagerMemory` for the memory.


---

Reply via email to