Example usage for org.apache.hadoop.yarn.server.api ContainerTerminationContext getContainerId

List of usage examples for org.apache.hadoop.yarn.server.api ContainerTerminationContext getContainerId

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.server.api ContainerTerminationContext getContainerId.

Prototype

public ContainerId getContainerId() 

Source Link

Document

Get ContainerId of the container being initialized or stopped.

Usage

From source file:org.apache.myriad.executor.MyriadExecutorAuxService.java

License:Apache License

@Override
public void stopContainer(ContainerTerminationContext stopContainerContext) {
    ContainerId containerId = stopContainerContext.getContainerId();
    synchronized (containerIds) {
        containerIds.remove(containerId.toString());
    }/*from w  w  w.j  a  v  a  2  s.  co  m*/
    sendStatus(stopContainerContext.getContainerId(), TaskState.TASK_FINISHED);
}

From source file:org.apache.spark.network.yarn.YarnShuffleService.java

License:Apache License

@Override
public void stopContainer(ContainerTerminationContext context) {
    ContainerId containerId = context.getContainerId();
    logger.info("Stopping container {}", containerId);
}