Skip to content

Commit 35214b0

Browse files
committed
[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 apache#255 from dongjoon-hyun/SPARK-52558. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 0e72f24 commit 35214b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spark-operator/src/main/java/org/apache/spark/k8s/operator/config/SparkOperatorConfManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
package org.apache.spark.k8s.operator.config;
2121

2222
import java.io.FileInputStream;
23+
import java.io.FileNotFoundException;
2324
import java.io.IOException;
2425
import java.io.InputStream;
2526
import java.util.Map;
@@ -94,6 +95,8 @@ private Properties getProperties(String filePath) {
9495
Properties properties = new Properties();
9596
try (InputStream inputStream = new FileInputStream(filePath)) {
9697
properties.load(inputStream);
98+
} catch (FileNotFoundException e) {
99+
log.warn("File Not Found: {}", filePath);
97100
} catch (IOException e) {
98101
log.error("Failed to load properties from {}.", filePath, e);
99102
}

0 commit comments

Comments
 (0)