Package org.apache.hadoop.yarn.api.records

Examples of org.apache.hadoop.yarn.api.records.ContainerState


   */
  void handleCompleted(YarnContainerStatus status, Multiset<String> restartRunnables) {
    containerLock.lock();
    String containerId = status.getContainerId();
    int exitStatus = status.getExitStatus();
    ContainerState state = status.getState();

    try {
      Map<String, TwillContainerController> lookup = containers.column(containerId);
      if (lookup.isEmpty()) {
        // It's OK because if a container is stopped through removeLast, this would be empty.
View Full Code Here


        log.debug("Reporting containerStatus=" + status);
      }

      ContainerId containerId = status.getContainerId();
      int exitStatus = status.getExitStatus();
      ContainerState state = status.getState();
      String cid = ConverterUtils.toString(containerId);

      synchronized (lock) {
        if (state.equals(ContainerState.COMPLETE)) {
          if (exitStatus > 0 || exitStatus == -100 || exitStatus == -101 || exitStatus == -1000) {
            failed.add(cid);
          } else if (exitStatus != -100) {
            // TODO: should do something centrally about exit statuses
            //       -100 - container released by app
View Full Code Here

    }

    for (Iterator<Container> iterator = launched.iterator(); iterator.hasNext();) {
      Container container = iterator.next();
      ContainerStatus status = getCmTemplate(container).getContainerStatus();
      ContainerState state = status.getState();
      if (state.equals(ContainerState.COMPLETE)) {
        iterator.remove();
      } else if (state.equals(ContainerState.RUNNING)) {
        iterator.remove();
        if (getYarnEventPublisher() != null) {
          getYarnEventPublisher().publishContainerLaunched(this, container);
        }
      }
View Full Code Here

   */
  void handleCompleted(YarnContainerStatus status, Multiset<String> restartRunnables) {
    containerLock.lock();
    String containerId = status.getContainerId();
    int exitStatus = status.getExitStatus();
    ContainerState state = status.getState();

    try {
      Map<String, TwillContainerController> lookup = containers.column(containerId);
      if (lookup.isEmpty()) {
        // It's OK because if a container is stopped through removeLast, this would be empty.
View Full Code Here

   */
  void handleCompleted(YarnContainerStatus status, Multiset<String> restartRunnables) {
    containerLock.lock();
    String containerId = status.getContainerId();
    int exitStatus = status.getExitStatus();
    ContainerState state = status.getState();

    try {
      Map<String, TwillContainerController> lookup = containers.column(containerId);
      if (lookup.isEmpty()) {
        // It's OK because if a container is stopped through removeLast, this would be empty.
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.api.records.ContainerState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.