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

This commit is contained in:
Weiwei Yang 2019-07-02 09:55:25 +08:00
parent 2f4b37b53c
commit 570eee30e5
2 changed files with 6 additions and 0 deletions

View File

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

View File

@ -748,6 +748,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