Java Code Examples for org.apache.hadoop.yarn.api.records.ContainerExitStatus#DISKS_FAILED

The following examples show how to use org.apache.hadoop.yarn.api.records.ContainerExitStatus#DISKS_FAILED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TaskSchedulerEventHandler.java    From incubator-tez with Apache License 2.0 6 votes vote down vote up
@Override
public synchronized void containerCompleted(Object task, ContainerStatus containerStatus) {
  // Inform the Containers about completion.
  AMContainer amContainer = appContext.getAllContainers().get(containerStatus.getContainerId());
  if (amContainer != null) {
    String message = null;
    int exitStatus = containerStatus.getExitStatus();
    if (exitStatus == ContainerExitStatus.PREEMPTED) {
      message = "Container preempted externally. ";
    } else if (exitStatus == ContainerExitStatus.DISKS_FAILED) {
      message = "Container disk failed. ";
    } else {
      message = "Container failed. ";
    }
    if (containerStatus.getDiagnostics() != null) {
      message += containerStatus.getDiagnostics();
    }
    sendEvent(new AMContainerEventCompleted(amContainer.getContainerId(), exitStatus, message));
  }
}
 
Example 2
Source File: TaskSchedulerManager.java    From tez with Apache License 2.0 6 votes vote down vote up
public synchronized void containerCompleted(int schedulerId, Object task, ContainerStatus containerStatus) {
  // SchedulerId isn't used here since no node updates are sent out
  // Inform the Containers about completion.
  AMContainer amContainer = appContext.getAllContainers().get(containerStatus.getContainerId());
  if (amContainer != null) {
    String message = "Container completed. ";
    TaskAttemptTerminationCause errCause = TaskAttemptTerminationCause.CONTAINER_EXITED;
    int exitStatus = containerStatus.getExitStatus();
    if (exitStatus == ContainerExitStatus.PREEMPTED) {
      message = "Container preempted externally. ";
      errCause = TaskAttemptTerminationCause.EXTERNAL_PREEMPTION;
    } else if (exitStatus == ContainerExitStatus.DISKS_FAILED) {
      message = "Container disk failed. ";
      errCause = TaskAttemptTerminationCause.NODE_DISK_ERROR;
    } else if (exitStatus != ContainerExitStatus.SUCCESS){
      message = "Container failed, exitCode=" + exitStatus + ". ";
    }
    if (containerStatus.getDiagnostics() != null) {
      message += containerStatus.getDiagnostics();
    }
    sendEvent(new AMContainerEventCompleted(amContainer.getContainerId(), exitStatus, message, errCause));
  }
}
 
Example 3
Source File: RMAppAttemptImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public boolean shouldCountTowardsMaxAttemptRetry() {
  try {
    this.readLock.lock();
    int exitStatus = getAMContainerExitStatus();
    return !(exitStatus == ContainerExitStatus.PREEMPTED
        || exitStatus == ContainerExitStatus.ABORTED
        || exitStatus == ContainerExitStatus.DISKS_FAILED
        || exitStatus == ContainerExitStatus.KILLED_BY_RESOURCEMANAGER);
  } finally {
    this.readLock.unlock();
  }
}
 
Example 4
Source File: RMAppAttemptImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public boolean shouldCountTowardsMaxAttemptRetry() {
  try {
    this.readLock.lock();
    int exitStatus = getAMContainerExitStatus();
    return !(exitStatus == ContainerExitStatus.PREEMPTED
        || exitStatus == ContainerExitStatus.ABORTED
        || exitStatus == ContainerExitStatus.DISKS_FAILED
        || exitStatus == ContainerExitStatus.KILLED_BY_RESOURCEMANAGER);
  } finally {
    this.readLock.unlock();
  }
}
 
Example 5
Source File: YarnService.java    From incubator-gobblin with Apache License 2.0 5 votes vote down vote up
/**
 * Check the exit status of a completed container and see if the replacement container
 * should try to be started on the same node. Some exit status indicates a disk or
 * node failure and in such cases the replacement container should try to be started on
 * a different node.
 */
private boolean shouldStickToTheSameNode(int containerExitStatus) {
  switch (containerExitStatus) {
    case ContainerExitStatus.DISKS_FAILED:
      return false;
    case ContainerExitStatus.ABORTED:
      // Mostly likely this exit status is due to node failures because the
      // application itself will not release containers.
      return false;
    default:
      // Stick to the same node for other cases if host affinity is enabled.
      return this.containerHostAffinityEnabled;
  }
}
 
Example 6
Source File: AMContainerEventCompleted.java    From incubator-tez with Apache License 2.0 4 votes vote down vote up
public boolean isDiskFailed() {
  return (exitStatus == ContainerExitStatus.DISKS_FAILED);
}
 
Example 7
Source File: AMContainerEventCompleted.java    From tez with Apache License 2.0 4 votes vote down vote up
public boolean isDiskFailed() {
  return (exitStatus == ContainerExitStatus.DISKS_FAILED);
}