Github user mccheah commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22215#discussion_r214491272
  
    --- Diff: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsLifecycleManager.scala
 ---
    @@ -151,13 +152,15 @@ private[spark] class ExecutorPodsLifecycleManager(
     
       private def exitReasonMessage(podState: FinalPodState, execId: Long, 
exitCode: Int) = {
         val pod = podState.pod
    +    val reason = Option(pod.getStatus.getReason)
    +    val message = Option(pod.getStatus.getMessage)
         s"""
            |The executor with id $execId exited with exit code $exitCode.
    -       |The API gave the following brief reason: ${pod.getStatus.getReason}
    -       |The API gave the following message: ${pod.getStatus.getMessage}
    +       |The API gave the following brief reason: ${reason.getOrElse("")}
    --- End diff --
    
    Maybe default as `N/A`? Might be confusing to be left blank.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to