Commit 75cd9be
[SPARK-55237][SQL] Suppress annoying messages when looking up nonexistent DBs
### What changes were proposed in this pull request?
When running `spark-sql` with embedded HMS and default log4j config, I see a lot of noisy logs.
```
spark-sql (default)> create database test_db;
26/01/27 15:56:33 WARN ObjectStore: Failed to get database test_db, returning NoSuchObjectException
26/01/27 15:56:33 WARN ObjectStore: Failed to get database test_db, returning NoSuchObjectException
26/01/27 15:56:33 WARN ObjectStore: Failed to get database test_db, returning NoSuchObjectException
Time taken: 0.87 seconds
spark-sql (default)>
```
This PR modifies the default log4j config files to suppress those logs.
Note, `ObjectStore` will not be called by the Spark driver when using remote HMS (typical deployment of production cases)
### Why are the changes needed?
Improve UX on `spark-sql` with embedded HMS and default log4j config.
### Does this PR introduce _any_ user-facing change?
Only affect logs. User would see less noise when running `spark-sql` with embedded HMS and default log4j config.
### How was this patch tested?
before (see above section) vs after
```
spark-sql (default)> create database test_db2;
Time taken: 0.686 seconds
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #54002 from pan3793/SPARK-55237.
Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: yangjie01 <yangjie01@baidu.com>1 parent 4344f3f commit 75cd9be
4 files changed
Lines changed: 18 additions & 18 deletions
File tree
- common/utils-java/src/main/resources/org/apache/spark
- conf
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments