Example usage for org.apache.hadoop.yarn.api.records ContainerExitStatus KILLED_BY_APPMASTER

List of usage examples for org.apache.hadoop.yarn.api.records ContainerExitStatus KILLED_BY_APPMASTER

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.api.records ContainerExitStatus KILLED_BY_APPMASTER.

Prototype

int KILLED_BY_APPMASTER

To view the source code for org.apache.hadoop.yarn.api.records ContainerExitStatus KILLED_BY_APPMASTER.

Click Source Link

Document

Container was terminated by stop request by the app master.

Usage

From source file:org.apache.slider.server.appmaster.state.ContainerOutcome.java

License:Apache License

/**
 * Build a container outcome from an exit status.
 * The values in {@link ContainerExitStatus} are used
 * here.//from  w w  w. j  av  a  2  s. com
 * @param exitStatus exit status
 * @return an enumeration of the outcome.
 */
public static ContainerOutcome fromExitStatus(int exitStatus) {
    switch (exitStatus) {
    case ContainerExitStatus.ABORTED:
    case ContainerExitStatus.KILLED_BY_APPMASTER:
    case ContainerExitStatus.KILLED_BY_RESOURCEMANAGER:
    case ContainerExitStatus.KILLED_AFTER_APP_COMPLETION:
        // could either be a release or node failure. Treat as completion
        return Completed;
    case ContainerExitStatus.DISKS_FAILED:
        return Node_failure;
    case ContainerExitStatus.PREEMPTED:
        return Preempted;
    case ContainerExitStatus.KILLED_EXCEEDED_PMEM:
    case ContainerExitStatus.KILLED_EXCEEDED_VMEM:
        return Failed_limits_exceeded;
    default:
        return exitStatus == 0 ? Completed : Failed;
    }
}