private static void addToContainerUpdates(AllocateResponse allocateResponse,
Allocation allocation, List<UpdateContainerError> updateContainerErrors) {
ApplicationMasterServiceUtils.addToUpdatedContainers(
allocateResponse, ContainerUpdateType.INCREASE_RESOURCE,
allocation.getIncreasedContainers());
ApplicationMasterServiceUtils.addToUpdatedContainers(
allocateResponse, ContainerUpdateType.DECREASE_RESOURCE,
allocation.getDecreasedContainers());
ApplicationMasterServiceUtils.addToUpdatedContainers(
allocateResponse, ContainerUpdateType.PROMOTE_EXECUTION_TYPE,
allocation.getPromotedContainers());
ApplicationMasterServiceUtils.addToUpdatedContainers(
allocateResponse, ContainerUpdateType.DEMOTE_EXECUTION_TYPE,
allocation.getDemotedContainers());
ApplicationMasterServiceUtils.addToUpdateContainerErrors(
allocateResponse, updateContainerErrors);
}
}