Search in sources :

Example 1 with YarnContainerLauncherEvent

use of com.tencent.angel.master.deploy.yarn.YarnContainerLauncherEvent in project angel by Tencent.

the class WorkerAttempt method cleanContainer.

@SuppressWarnings("unchecked")
private void cleanContainer() {
    AngelDeployMode deployMode = context.getDeployMode();
    ContainerLauncherEvent launchEvent = null;
    if (deployMode == AngelDeployMode.LOCAL) {
        launchEvent = new LocalContainerLauncherEvent(ContainerLauncherEventType.CONTAINER_REMOTE_CLEANUP, id);
    } else {
        launchEvent = new YarnContainerLauncherEvent(id, container.getId(), StringInterner.weakIntern(container.getNodeId().toString()), container.getContainerToken(), ContainerLauncherEventType.CONTAINER_REMOTE_CLEANUP);
    }
    context.getEventHandler().handle(launchEvent);
}
Also used : AngelDeployMode(com.tencent.angel.AngelDeployMode) YarnContainerLauncherEvent(com.tencent.angel.master.deploy.yarn.YarnContainerLauncherEvent) YarnContainerLauncherEvent(com.tencent.angel.master.deploy.yarn.YarnContainerLauncherEvent) LocalContainerLauncherEvent(com.tencent.angel.master.deploy.local.LocalContainerLauncherEvent) ContainerLauncherEvent(com.tencent.angel.master.deploy.ContainerLauncherEvent) LocalContainerLauncherEvent(com.tencent.angel.master.deploy.local.LocalContainerLauncherEvent)

Aggregations

AngelDeployMode (com.tencent.angel.AngelDeployMode)1 ContainerLauncherEvent (com.tencent.angel.master.deploy.ContainerLauncherEvent)1 LocalContainerLauncherEvent (com.tencent.angel.master.deploy.local.LocalContainerLauncherEvent)1 YarnContainerLauncherEvent (com.tencent.angel.master.deploy.yarn.YarnContainerLauncherEvent)1