Example usage for org.apache.hadoop.yarn.server.resourcemanager.rmcontainer RMContainer getContainerId

List of usage examples for org.apache.hadoop.yarn.server.resourcemanager.rmcontainer RMContainer getContainerId

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.server.resourcemanager.rmcontainer RMContainer getContainerId.

Prototype

ContainerId getContainerId();

Source Link

Usage

From source file:org.apache.myriad.scheduler.fgs.YarnNodeCapacityManager.java

License:Apache License

private Protos.TaskID containerToTaskId(RMContainer container) {
    return Protos.TaskID.newBuilder().setValue("yarn_" + container.getContainerId()).build();
}

From source file:org.apache.myriad.scheduler.fgs.YarnNodeCapacityManager.java

License:Apache License

@Override
public void beforeCompletedContainer(RMContainer rmContainer, ContainerStatus containerStatus,
        RMContainerEventType type) {// www  .j  a  va2  s .c  o m
    if (type.equals(RMContainerEventType.KILL) || type.equals(RMContainerEventType.RELEASED)) {
        LOGGER.info("{} completed with exit status {}, killing cooresponding mesos task.",
                rmContainer.getContainerId().toString(), type);
        removeYarnTask(rmContainer);
    }
}