-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-8981][CORE][test-hadoop3.2][test-java11] Add MDC support in Executor #26624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c0e6f03
b43f861
0324746
0c23e26
04078b4
4deda15
0685aba
d5c1aa9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2955,6 +2955,12 @@ Spark uses [log4j](http://logging.apache.org/log4j/) for logging. You can config | |
| `log4j.properties` file in the `conf` directory. One way to start is to copy the existing | ||
| `log4j.properties.template` located there. | ||
|
|
||
| By default, Spark adds 1 record to the MDC (Mapped Diagnostic Context): `taskName`, which shows something | ||
| like `task 1.0 in stage 0.0`. You can add `%X{taskName}` to your patternLayout in | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Could you give an example to show how to use it in this document? For example, use an example to show how to specify your application names/identifiers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gatorsmile were you able to figure this out? My MDC values are not propagating in my logs after following this same procedure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alefischer13 Just a guess, but it looks like this was changed in 54e702c so that the MDC key still includes the |
||
| order to print it in the logs. | ||
| Moreover, you can use `spark.sparkContext.setLocalProperty("mdc." + name, "value")` to add user specific data into MDC. | ||
| The key in MDC will be the string after the `mdc.` prefix. | ||
|
|
||
| # Overriding configuration directory | ||
|
|
||
| To specify a different configuration directory other than the default "SPARK_HOME/conf", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.