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

ASF GitHub Bot commented on FLINK-9028:
---------------------------------------

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

    https://github.com/apache/flink/pull/5726#discussion_r175772251
  
    --- Diff: 
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
 ---
    @@ -409,6 +411,12 @@ public void terminateCluster(ApplicationId 
applicationId) throws FlinkException
                }
        }
     
    +   private void checkConfig(ClusterSpecification clusterSpecification) {
    +           long taskManagerMemorySize = 
clusterSpecification.getTaskManagerMemoryMB();
    +           long cutoff = 
ResourceManagerRuntimeServices.calculateCutoffMB(flinkConfiguration, 
taskManagerMemorySize);
    +           TaskManagerServices.calculateHeapSizeMB(taskManagerMemorySize - 
cutoff, flinkConfiguration);
    --- End diff --
    
    Hmm...This is a bit tricky, the `calculation logic` is a bit hard to be 
separated from the `check logical` so clearly, because when we perform the 
checking we also need to do the calculation by the way. So pull the `check 
logical` from the `calculateFunction` to be a separated function means we will 
have some 
    code duplication. So I'd like to add a comment here, if you still think we 
should pull out a new function I would just do it ;).


> flip6 should check config before starting cluster
> -------------------------------------------------
>
>                 Key: FLINK-9028
>                 URL: https://issues.apache.org/jira/browse/FLINK-9028
>             Project: Flink
>          Issue Type: Bug
>          Components: Distributed Coordination
>    Affects Versions: 1.5.0
>            Reporter: Sihua Zhou
>            Assignee: Sihua Zhou
>            Priority: Major
>             Fix For: 1.5.0
>
>
> In flip6, we should perform parameters checking before starting cluster.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to