code: 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;
      }
    }
docs: 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.