Github user mxm commented on a diff in the pull request:
https://github.com/apache/flink/pull/1741#discussion_r57009817
--- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java ---
@@ -60,8 +63,8 @@
* See documentation
*/
public static int calculateHeapSize(int memory,
org.apache.flink.configuration.Configuration conf) {
- float memoryCutoffRatio =
conf.getFloat(ConfigConstants.YARN_HEAP_CUTOFF_RATIO,
ConfigConstants.DEFAULT_YARN_HEAP_CUTOFF_RATIO);
- int minCutoff =
conf.getInteger(ConfigConstants.YARN_HEAP_CUTOFF_MIN,
ConfigConstants.DEFAULT_YARN_MIN_HEAP_CUTOFF);
+ float memoryCutoffRatio =
conf.getFloat(ConfigConstants.YARN_HEAP_CUTOFF_RATIO, 0.25f);
+ int minCutoff =
conf.getInteger(ConfigConstants.YARN_HEAP_CUTOFF_MIN, 600);
--- End diff --
Originally, those were going to be replaced by generalized keys and values.
However, we need default values for every resource management system. So I'll
use the generalized keys with the default yarn values here. Like so:
```java
float memoryCutoffRatio =
conf.getFloat(ConfigConstants.CONTAINERED_HEAP_CUTOFF_RATIO,
ConfigConstants.DEFAULT_YARN_HEAP_CUTOFF_RATIO);
int minCutoff =
conf.getInteger(ConfigConstants.CONTAINERED_HEAP_CUTOFF_MIN,
ConfigConstants.DEFAULT_YARN_HEAP_CUTOFF);
```
The deprecated keys are replaced beforehand using
```java
BootstrapTools.substituteDeprecatedConfigKey(conf,
ConfigConstants.YARN_HEAP_CUTOFF_RATIO,
ConfigConstants.CONTAINERED_HEAP_CUTOFF_RATIO);
BootstrapTools.substituteDeprecatedConfigKey(conf,
ConfigConstants.YARN_HEAP_CUTOFF_MIN,
ConfigConstants.CONTAINERED_HEAP_CUTOFF_MIN);
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---