return aggregatedVolume;
}
}
public static void allocateContainers(SubQuery subQuery) {
ExecutionBlock execBlock = subQuery.getBlock();
QueryUnit [] tasks = subQuery.getQueryUnits();
int numRequest = subQuery.getContext().getResourceAllocator().calculateNumRequestContainers(
subQuery.getContext().getQueryMasterContext().getWorkerContext(), tasks.length
);
final Resource resource = Records.newRecord(Resource.class);
resource.setMemory(2000);
LOG.info("Request Container for " + subQuery.getId() + " containers=" + numRequest);
Priority priority = Records.newRecord(Priority.class);
priority.setPriority(subQuery.getPriority());
ContainerAllocationEvent event =
new ContainerAllocationEvent(ContainerAllocatorEventType.CONTAINER_REQ,
subQuery.getId(), priority, resource, numRequest,
execBlock.isLeafBlock(), 0.0f);
subQuery.eventHandler.handle(event);
}