sharma-0311 opened a new pull request, #56035:
URL: https://github.com/apache/spark/pull/56035

   ## What changes were proposed in this pull request?
   
   This PR fixes two related issues where Spark fails when configured log 
directories do not already exist.
   
   ### Changes
   
   1. Auto-create `spark.history.fs.logDirectory` if missing before History 
Server startup.
   2. Auto-create `spark.eventLog.dir` if missing before event logging 
initialization.
   
   ### Why are the changes needed?
   
   Currently:
   
   * `FsHistoryProvider` fails when the configured history log directory does 
not exist.
   * `EventLogFileWriter` throws `FileNotFoundException` if the event log 
directory does not exist.
   
   This behavior affects local filesystems as well as S3/Hadoop-backed 
filesystems.
   
   The fix creates the directories automatically using Hadoop 
`FileSystem.mkdirs()` before validation proceeds.
   
   ### Does this PR introduce any user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Added unit tests:
   
   * `EventLogFileWritersSuite`
   * `FsHistoryProviderSuite`
   
   Tested automatic creation of missing directories during initialization.
   


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

To unsubscribe, e-mail: [email protected]

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