dongjoon-hyun commented on a change in pull request #31071:
URL: https://github.com/apache/spark/pull/31071#discussion_r553114305



##########
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:
       Yes, I do because it's shorter. :)




----------------------------------------------------------------
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]

Reply via email to