This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 457542966651 [SPARK-52537][CORE] Print stacktrace on creating temp dir 
failure
457542966651 is described below

commit 457542966651e4e0e221e7a8e95f5fd50b526501
Author: Cheng Pan <[email protected]>
AuthorDate: Fri Jun 20 11:08:27 2025 -0700

    [SPARK-52537][CORE] Print stacktrace on creating temp dir failure
    
    ### What changes were proposed in this pull request?
    
    Print stacktrace on creating temp dir failure.
    
    Currently, only a simple message is printed, and I have no idea about the 
root cause.
    ```
    2025-06-18 04:06:33 ERROR Utils - Failed to create dir in ./local. Ignoring 
this directory.
    ```
    
    ### Why are the changes needed?
    
    Better error message.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manual review, as only logs are touched.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #51228 from pan3793/SPARK-52537.
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 core/src/main/scala/org/apache/spark/util/Utils.scala | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala 
b/core/src/main/scala/org/apache/spark/util/Utils.scala
index c3b02feaa4c8..2d3ae9f171fe 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -816,13 +816,12 @@ private[spark] object Utils
           Some(dir.getAbsolutePath)
         } else {
           logError(log"Failed to create dir in ${MDC(PATH, root)}. Ignoring 
this directory.")
-
           None
         }
       } catch {
         case e: IOException =>
           logError(
-            log"Failed to create local root dir in ${MDC(PATH, root)}. 
Ignoring this directory.")
+            log"Failed to create local root dir in ${MDC(PATH, root)}. 
Ignoring this directory.", e)
           None
       }
     }


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

Reply via email to