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

    https://github.com/apache/spark/pull/14202#discussion_r70899567
  
    --- Diff: 
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
 ---
    @@ -147,7 +148,10 @@ private[spark] class CoarseGrainedExecutorBackend(
        * executor exits differently. For e.g. when an executor goes down,
        * back-end may not want to take the parent process down.
        */
    -  protected def exitExecutor(code: Int): Unit = System.exit(code)
    +  protected def exitExecutor(code: Int, reason: String, throwable: 
Throwable = null) = {
    +    logError(reason, throwable)
    --- End diff --
    
    @tejasapatil  do you know if all log frameworks can handle `null` throwable 
here? Perhaps  it's better to handle it by ourselves like:
    ```
    if (throwable != null) {
       logError(reason, throwable)
    } else {
      logError(reason)
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to