tillrohrmann commented on a change in pull request #9336:
[FLINK-13548][Deployment/YARN]Support priority of the Flink YARN application
URL: https://github.com/apache/flink/pull/9336#discussion_r318089548
##########
File path:
flink-yarn/src/test/java/org/apache/flink/yarn/FlinkYarnSessionCliTest.java
##########
@@ -137,6 +137,32 @@ public void testCorrectSettingOfDetachedMode() throws
Exception {
assertTrue(descriptor.isDetachedMode());
}
+ @Test
+ public void testConfigurationBeforeDeployment() throws Exception {
+ String[] params = new String[] { "-yD",
"yarn.application.priority=10"};
+
+ FlinkYarnSessionCli yarnCLI = new FlinkYarnSessionCli(
+ new Configuration(),
+ tmp.getRoot().getAbsolutePath(),
+ "y",
+ "yarn");
+
+ CommandLine commandLine =
yarnCLI.parseCommandLineOptions(params, true);
+
+ AbstractYarnClusterDescriptor descriptor =
yarnCLI.createClusterDescriptor(commandLine);
+ Configuration flinkConfiguration =
descriptor.getFlinkConfiguration();
+
+ // YarnClusterDescriptor will add dynamic properties to local
flinkConfiguraton before deployment
+ Map<String, String> dynProperties =
+
FlinkYarnSessionCli.getDynamicProperties(descriptor.getDynamicPropertiesEncoded());
+ for (Map.Entry<String, String> dynProperty :
dynProperties.entrySet()) {
+ flinkConfiguration.setString(dynProperty.getKey(),
dynProperty.getValue());
+ }
+
+ int priority =
flinkConfiguration.getInteger(YarnConfigOptions.APPLICATION_PRIORITY);
+ assertEquals(10, priority);
+ }
Review comment:
What do we test here exactly? Shouldn't we rather test that given
`YarnConfigOptions.APPLICATION_PRIORITY` being set that we create an
`ApplicationSubmissionContext` with this priority?
----------------------------------------------------------------
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