dongjoon-hyun commented on a change in pull request #31071:
URL: https://github.com/apache/spark/pull/31071#discussion_r552964919
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsSnapshot.scala
##########
@@ -86,10 +86,13 @@ object ExecutorPodsSnapshot extends Logging {
sparkContainerStatusOpt match {
case Some(sparkContainerStatus) =>
sparkContainerStatus.getState.getTerminated match {
+ // If there is no terminated state we are running.
+ case null => PodRunning(pod)
case t if t.getExitCode != 0 =>
PodFailed(pod)
case t if t.getExitCode == 0 =>
PodSucceeded(pod)
+ // Fall through case
case _ =>
PodRunning(pod)
}
Review comment:
What about the following?
```scala
sparkContainerStatus.getState.getTerminated match {
case t if t != null and t.getExitCode != 0 =>
PodFailed(pod)
case t if t != null and t.getExitCode == 0 =>
PodSucceeded(pod)
case _ =>
PodRunning(pod)
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]