YARN-9655. AllocateResponse in FederationInterceptor lost applicationPriority. Contributed by hunshenshi.
This commit is contained in:
parent
2f4b37b53c
commit
570eee30e5
@ -1446,6 +1446,11 @@ protected void mergeAllocateResponse(AllocateResponse homeResponse,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (otherResponse.getApplicationPriority() != null) {
|
||||||
|
homeResponse.setApplicationPriority(
|
||||||
|
otherResponse.getApplicationPriority());
|
||||||
|
}
|
||||||
|
|
||||||
homeResponse.setNumClusterNodes(
|
homeResponse.setNumClusterNodes(
|
||||||
homeResponse.getNumClusterNodes() + otherResponse.getNumClusterNodes());
|
homeResponse.getNumClusterNodes() + otherResponse.getNumClusterNodes());
|
||||||
|
|
||||||
|
@ -748,6 +748,7 @@ public void testAllocateResponse() throws Exception {
|
|||||||
Assert.assertEquals(1, response.getNMTokens().size());
|
Assert.assertEquals(1, response.getNMTokens().size());
|
||||||
Assert.assertEquals(1, response.getUpdatedContainers().size());
|
Assert.assertEquals(1, response.getUpdatedContainers().size());
|
||||||
Assert.assertEquals(1, response.getUpdateErrors().size());
|
Assert.assertEquals(1, response.getUpdateErrors().size());
|
||||||
|
Assert.assertNotNull(response.getApplicationPriority());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user