[SPARK-48124][CORE] Disable structured logging for Interpreters by default#46383
Closed
gengliangwang wants to merge 4 commits intoapache:masterfrom
Closed
[SPARK-48124][CORE] Disable structured logging for Interpreters by default#46383gengliangwang wants to merge 4 commits intoapache:masterfrom
gengliangwang wants to merge 4 commits intoapache:masterfrom
Conversation
gengliangwang
commented
May 4, 2024
|
|
||
| - Since Spark 4.0, Spark uses the external shuffle service for deleting shuffle blocks for deallocated executors when the shuffle is no longer needed. To restore the legacy behavior, you can set `spark.shuffle.service.removeShuffle` to `false`. | ||
|
|
||
| - Since Spark 4.0, the default log4j output has shifted from plain text to JSON lines to enhance analyzability. To revert to plain text output, you can either set `spark.log.structuredLogging.enabled` to `false`, or use a custom log4j configuration. |
Member
Author
There was a problem hiding this comment.
Note: the flag spark.log.structuredLogging.enabled is not taking effect as expected. I created https://issues.apache.org/jira/browse/SPARK-48126 as a follow-up. Let's not mention it in the Spark 4.0 preview release.
dongjoon-hyun
approved these changes
May 4, 2024
Member
dongjoon-hyun
left a comment
There was a problem hiding this comment.
+1, LGTM. Thank you, @gengliangwang .
Member
|
Merged to master for Apache Spark 4.0.0-preview. |
Member
Author
|
Thank you, @dongjoon-hyun ! |
gengliangwang
pushed a commit
that referenced
this pull request
May 5, 2024
…fault ### What changes were proposed in this pull request? The pr is followup #46383, to `disable` structured logging for` Connect-Repl` by default. ### Why are the changes needed? Before: <img width="1397" alt="image" src="https://github.com/apache/spark/assets/15246973/10d93a09-f098-4653-9e95-571481dd03e9"> After: <img width="1406" alt="image" src="https://github.com/apache/spark/assets/15246973/e3354359-d6bc-4b2c-801b-8a2c3697f78e"> ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually test. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #46387 from panbingkun/SPARK-48124_FOLLOWUP. Authored-by: panbingkun <panbingkun@baidu.com> Signed-off-by: Gengliang Wang <gengliang@apache.org>
sinaiamonkar-sai
pushed a commit
to sinaiamonkar-sai/spark
that referenced
this pull request
May 5, 2024
…fault
### What changes were proposed in this pull request?
For interpreters, structured logging should be disabled by default to avoid generating mixed plain text and structured logs on the same console.
spark-shell output with mixed plain text and structured logs:
```
Using Scala version 2.13.13 (OpenJDK 64-Bit Server VM, Java 17.0.9)
Type in expressions to have them evaluated.
Type :help for more information.
{"ts":"2024-05-04T01:11:03.797Z","level":"WARN","msg":"Unable to load native-hadoop library for your platform... using builtin-java classes where applicable","logger":"NativeCodeLoader"} {"ts":"2024-05-04T01:11:04.104Z","level":"WARN","msg":"Service 'SparkUI' could not bind on port 4040. Attempting port 4041.","logger":"Utils"}
Spark context Web UI available at http://10.10.114.155:4041/
Spark context available as 'sc' (master = local[*], app id = local-1714785064155).
Spark session available as 'spark'.
```
After changes, all the output are plain text:
```
Type :help for more information.
24/05/03 18:11:35 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
24/05/03 18:11:35 WARN Utils: Service 'SparkUI' could not bind on port 4040. Attempting port 4041.
Spark context Web UI available at http://10.10.114.155:4041/
Spark context available as 'sc' (master = local[*], app id = local-1714785095892).
Spark session available as 'spark'.
```
Note that submitting a spark application using `spark-submit` will still generates structured logs.
### Why are the changes needed?
To avoid tgenerating mixed plain text and structured logs on the same console when using the Interpreters.
### Does this PR introduce _any_ user-facing change?
No, this reverts to the behavior of Spark 3.5
### How was this patch tested?
Manual test
### Was this patch authored or co-authored using generative AI tooling?
No
Closes apache#46383 from gengliangwang/disableStructuredLogInRepl.
Authored-by: Gengliang Wang <gengliang@apache.org>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
sinaiamonkar-sai
pushed a commit
to sinaiamonkar-sai/spark
that referenced
this pull request
May 5, 2024
…fault ### What changes were proposed in this pull request? The pr is followup apache#46383, to `disable` structured logging for` Connect-Repl` by default. ### Why are the changes needed? Before: <img width="1397" alt="image" src="https://github.com/apache/spark/assets/15246973/10d93a09-f098-4653-9e95-571481dd03e9"> After: <img width="1406" alt="image" src="https://github.com/apache/spark/assets/15246973/e3354359-d6bc-4b2c-801b-8a2c3697f78e"> ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually test. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#46387 from panbingkun/SPARK-48124_FOLLOWUP. Authored-by: panbingkun <panbingkun@baidu.com> Signed-off-by: Gengliang Wang <gengliang@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
For interpreters, structured logging should be disabled by default to avoid generating mixed plain text and structured logs on the same console.
spark-shell output with mixed plain text and structured logs:
After changes, all the output are plain text:
Note that submitting a spark application using
spark-submitwill still generates structured logs.Why are the changes needed?
To avoid tgenerating mixed plain text and structured logs on the same console when using the Interpreters.
Does this PR introduce any user-facing change?
No, this reverts to the behavior of Spark 3.5
How was this patch tested?
Manual test
Was this patch authored or co-authored using generative AI tooling?
No