[ 
https://issues.apache.org/jira/browse/SPARK-62291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-62291:
-----------------------------------
    Labels: pull-request-available  (was: )

> Add `spark.eventLog.failOnError` to allow applications to continue without 
> event logging when event log initialization fails
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-62291
>                 URL: https://issues.apache.org/jira/browse/SPARK-62291
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 3.5.9, 4.2.1, 4.0.5, 4.1.4
>            Reporter: Zemin Piao
>            Priority: Minor
>              Labels: pull-request-available
>
> Event logs are observability data. An application's results do not depend on 
> them, so a failure to write them should not have to fail the application.
> Spark already treats event log failures as non-fatal everywhere except at 
> startup:
>  * while the application runs, exceptions from {{EventLoggingListener}} are 
> caught and logged by {{{}ListenerBus.postToAll{}}}, and events are dropped 
> when the {{eventLog}} queue is full;
>  * at shutdown, {{_eventLogger.stop()}} is wrapped in 
> {{{}Utils.tryLogNonFatalError{}}}.
> The one fatal point is {{SparkContext}} initialization, which calls 
> {{EventLoggingListener.start()}} without a guard. If the event log directory 
> is missing, not writable, over a storage quota or limit, or the storage 
> system rejects the write, the application fails. There is currently no way to 
> make event logging fully non-fatal.
> Since the History Server reads from it, the event log directory is typically 
> shared by all applications on a cluster, so a problem with it makes every new 
> application fail, independently of the storage holding the applications' data.
> *Proposal:* add {{spark.eventLog.failOnError}} (boolean, default 
> {{{}true{}}}). When it is {{false}} and creating or starting the 
> {{EventLoggingListener}} throws a non-fatal exception, {{SparkContext}} logs 
> the error and continues without event logging.
> This is not the directory auto-creation proposed and rejected in SPARK-5311, 
> SPARK-11074 and SPARK-56967. No directories are created and no permissions 
> are changed. The default is unchanged, so a misconfigured directory still 
> fails fast.
> *Alternatives considered:*
>  * _Set {{{}spark.eventLog.enabled=false{}}}:_ this disables event logging 
> for all applications, including when the storage is healthy. Disabling it 
> only after a failure is noticed means applications have already failed, and 
> the change has to reach every launcher and job.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to