浏览代码

YARN-9655. AllocateResponse in FederationInterceptor lost applicationPriority. Contributed by hunshenshi.

(cherry picked from commit 78a6e4099459e2fa9e9552887107c1f1223dba36)
Weiwei Yang 5 年之前
父节点
当前提交
45e11e7b7e

+ 5 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/FederationInterceptor.java

@@ -1295,6 +1295,11 @@ public class FederationInterceptor extends AbstractRequestInterceptor {
     homeResponse.setNumClusterNodes(
     homeResponse.setNumClusterNodes(
         homeResponse.getNumClusterNodes() + otherResponse.getNumClusterNodes());
         homeResponse.getNumClusterNodes() + otherResponse.getNumClusterNodes());
 
 
+    if (otherResponse.getApplicationPriority() != null) {
+      homeResponse.setApplicationPriority(
+          otherResponse.getApplicationPriority());
+    }
+
     PreemptionMessage homePreempMessage = homeResponse.getPreemptionMessage();
     PreemptionMessage homePreempMessage = homeResponse.getPreemptionMessage();
     PreemptionMessage otherPreempMessage = otherResponse.getPreemptionMessage();
     PreemptionMessage otherPreempMessage = otherResponse.getPreemptionMessage();