use of com.tencent.angel.master.deploy.yarn.YarnContainerAllocatorEvent in project angel by Tencent.
the class WorkerAttempt method deallocContainer.
@SuppressWarnings("unchecked")
private void deallocContainer() {
LOG.info("release container:" + container);
AngelDeployMode deployMode = context.getDeployMode();
ContainerAllocatorEvent allocatorEvent = null;
if (deployMode == AngelDeployMode.LOCAL) {
allocatorEvent = new LocalContainerAllocatorEvent(ContainerAllocatorEventType.CONTAINER_DEALLOCATE, id);
} else {
allocatorEvent = new YarnContainerAllocatorEvent(id, ContainerAllocatorEventType.CONTAINER_DEALLOCATE, context.getWorkerManager().getWorkerPriority());
}
context.getEventHandler().handle(allocatorEvent);
}
Aggregations