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

(cherry picked from commit 570eee30e5)
This commit is contained in:
Weiwei Yang 2019-07-02 09:55:25 +08:00
parent 4f622ecad8
commit 46b81a982b
2 changed files with 6 additions and 0 deletions

View File

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

View File

@ -668,6 +668,7 @@ public class TestFederationInterceptor extends BaseAMRMProxyTest {
Assert.assertEquals(1, response.getNMTokens().size());
Assert.assertEquals(1, response.getUpdatedContainers().size());
Assert.assertEquals(1, response.getUpdateErrors().size());
Assert.assertNotNull(response.getApplicationPriority());
}
@Test