Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/5726#discussion_r175752794
--- 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 --
I somehow don't like that we calculate some value just in order to check
whether an unchecked exception is thrown. This should be imo more explicit. Or
at least it should get a comment explaining what's going on here.
---