flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #5593: [FLINK-7836][Client] specifying node label for fli...
Date Wed, 28 Feb 2018 09:01:52 GMT
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`?


---

Mime
View raw message