Github user GJL commented on a diff in the pull request: https://github.com/apache/flink/pull/5216#discussion_r159243765 --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java --- @@ -143,31 +138,48 @@ private YarnConfigOptions.UserJarInclusion userJarInclusion; public AbstractYarnClusterDescriptor( - org.apache.flink.configuration.Configuration flinkConfiguration, - String configurationDirectory) { + Configuration flinkConfiguration, + String configurationDirectory, + YarnClient yarnClient) { + + yarnConfiguration = new YarnConfiguration(); + // for unit tests only if (System.getenv("IN_TESTS") != null) { try { - conf.addResource(new File(System.getenv("YARN_CONF_DIR") + "/yarn-site.xml").toURI().toURL()); + yarnConfiguration.addResource(new File(System.getenv("YARN_CONF_DIR") + "/yarn-site.xml").toURI().toURL()); --- End diff -- I think it's safer to use `new File(System.getenv("YARN_CONF_DIR"), "yarn-site.xml")`
---