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

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 35214b0  [SPARK-52558] Lower `SparkOperatorConfManager` log level to 
WARN for `FileNotFoundException`
35214b0 is described below

commit 35214b00c777c724d9cd40208601839824811346
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Jun 23 16:11:03 2025 -0700

    [SPARK-52558] Lower `SparkOperatorConfManager` log level to WARN for 
`FileNotFoundException`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to lower `SparkOperatorConfManager` log level from `ERROR` to 
`WARN` for `FileNotFoundException` because the current logic works without any 
issues. In this case, `WARN` level is more proper than `ERROR` level log.
    
    ### Why are the changes needed?
    
    To provide a proper log level for the logs.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes, but only log level change.
    
    ### How was this patch tested?
    
    Manual review.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #255 from dongjoon-hyun/SPARK-52558.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../org/apache/spark/k8s/operator/config/SparkOperatorConfManager.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/spark-operator/src/main/java/org/apache/spark/k8s/operator/config/SparkOperatorConfManager.java
 
b/spark-operator/src/main/java/org/apache/spark/k8s/operator/config/SparkOperatorConfManager.java
index 11ae3fd..a3e8e36 100644
--- 
a/spark-operator/src/main/java/org/apache/spark/k8s/operator/config/SparkOperatorConfManager.java
+++ 
b/spark-operator/src/main/java/org/apache/spark/k8s/operator/config/SparkOperatorConfManager.java
@@ -20,6 +20,7 @@
 package org.apache.spark.k8s.operator.config;
 
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Map;
@@ -94,6 +95,8 @@ public class SparkOperatorConfManager {
     Properties properties = new Properties();
     try (InputStream inputStream = new FileInputStream(filePath)) {
       properties.load(inputStream);
+    } catch (FileNotFoundException e) {
+      log.warn("File Not Found: {}", filePath);
     } catch (IOException e) {
       log.error("Failed to load properties from {}.", filePath, e);
     }


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

Reply via email to