KarmaGYZ commented on a change in pull request #11577: [FLINK-16874] Respect
the dynamic options when calculating memory options in taskmanager.sh
URL: https://github.com/apache/flink/pull/11577#discussion_r409404787
##########
File path:
flink-dist/src/test/java/org/apache/flink/dist/BashJavaUtilsITCase.java
##########
@@ -46,4 +50,15 @@ public void testGetTmResourceParamsConfigs() throws
Exception {
ConfigurationUtils.parseJvmArgString(lines.get(lines.size() -
2));
ConfigurationUtils.parseTmResourceDynamicConfigs(lines.get(lines.size() - 1));
}
+
+ @Test
+ public void testConfigOverwrittenByDynamicOpts() throws Exception {
+ double cpuCores = 39.0;
+ String[] commands = {RUN_BASH_JAVA_UTILS_CMD_SCRIPT,
BashJavaUtils.Command.GET_TM_RESOURCE_PARAMS.toString(), "-D" +
TaskManagerOptions.CPU_CORES.key() + "=" + cpuCores};
+ List<String> lines =
Arrays.asList(executeScript(commands).split(System.lineSeparator()));
+
+ assertEquals(2, lines.size());
+ Map<String, String> configs =
ConfigurationUtils.parseTmResourceDynamicConfigs(lines.get(lines.size() - 1));
Review comment:
Make sense. Fixed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services