use of org.apache.hadoop.yarn.server.api.protocolrecords.DistributedSchedulingAllocateResponse in project hadoop by apache.
the class OpportunisticContainerAllocatorAMService method allocateForDistributedScheduling.
@Override
public DistributedSchedulingAllocateResponse allocateForDistributedScheduling(DistributedSchedulingAllocateRequest request) throws YarnException, IOException {
List<Container> distAllocContainers = request.getAllocatedContainers();
handleNewContainers(distAllocContainers, true);
AllocateResponse response = allocate(request.getAllocateRequest());
DistributedSchedulingAllocateResponse dsResp = recordFactory.newRecordInstance(DistributedSchedulingAllocateResponse.class);
dsResp.setAllocateResponse(response);
dsResp.setNodesForScheduling(getLeastLoadedNodes());
return dsResp;
}
Aggregations