Search in sources :

Example 1 with ContainerAllocatorEvent

use of com.tencent.angel.master.deploy.ContainerAllocatorEvent 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);
}
Also used : AngelDeployMode(com.tencent.angel.AngelDeployMode) YarnContainerAllocatorEvent(com.tencent.angel.master.deploy.yarn.YarnContainerAllocatorEvent) LocalContainerAllocatorEvent(com.tencent.angel.master.deploy.local.LocalContainerAllocatorEvent) YarnContainerAllocatorEvent(com.tencent.angel.master.deploy.yarn.YarnContainerAllocatorEvent) ContainerAllocatorEvent(com.tencent.angel.master.deploy.ContainerAllocatorEvent) LocalContainerAllocatorEvent(com.tencent.angel.master.deploy.local.LocalContainerAllocatorEvent)

Aggregations

AngelDeployMode (com.tencent.angel.AngelDeployMode)1 ContainerAllocatorEvent (com.tencent.angel.master.deploy.ContainerAllocatorEvent)1 LocalContainerAllocatorEvent (com.tencent.angel.master.deploy.local.LocalContainerAllocatorEvent)1 YarnContainerAllocatorEvent (com.tencent.angel.master.deploy.yarn.YarnContainerAllocatorEvent)1