Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/5593#discussion_r171177337
--- Diff:
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
---
@@ -979,6 +989,16 @@ public ApplicationReport startAppMaster(
appContext.setApplicationType("Apache Flink");
appContext.setAMContainerSpec(amContainer);
appContext.setResource(capability);
+
+ if (nodeLabel != null) {
+ try {
+ Method method =
appContext.getClass().getMethod("setNodeLabelExpression", String.class);
+ method.invoke(appContext, nodeLabel);
+ } catch (NoSuchMethodException e) {
+ LOG.warn("Ignoring node label setting because
the version of YARN does not support it");
+ }
+ }
--- End diff --
Could we wrap this call in something like
`RegisterApplicationMasterResponseReflector`?
---