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

    https://github.com/apache/flink/pull/6297#discussion_r202624004
  
    --- Diff: 
flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java ---
    @@ -500,11 +500,19 @@ protected Configuration 
applyCommandLineOptionsToConfiguration(CommandLine comma
                }
     
                if (commandLine.hasOption(jmMemory.getOpt())) {
    -                   
effectiveConfiguration.setString(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY, 
commandLine.getOptionValue(jmMemory.getOpt()));
    +                   String jmMemoryVal = 
commandLine.getOptionValue(jmMemory.getOpt());
    +                   if (!jmMemoryVal.toLowerCase().contains("m")) {
    +                           jmMemoryVal += "m";
    +                   }
    +                   
effectiveConfiguration.setString(JobManagerOptions.JOB_MANAGER_HEAP_MEMORY, 
jmMemoryVal);
                }
     
                if (commandLine.hasOption(tmMemory.getOpt())) {
    -                   
effectiveConfiguration.setString(TaskManagerOptions.TASK_MANAGER_HEAP_MEMORY, 
commandLine.getOptionValue(tmMemory.getOpt()));
    +                   String tmMemoryVal = 
commandLine.getOptionValue(tmMemory.getOpt());
    +                   if (!tmMemoryVal.toLowerCase().contains("m")) {
    --- End diff --
    
    Same as above


---

Reply via email to