Skip to content
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

[SPARK-50433][DOCS][TEST] Fix confguring log4j2 guide docs for Spark on YARN and UT #48981

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Nov 27, 2024

What changes were proposed in this pull request?

As title.

Why are the changes needed?

SPARK-37814 (3.3.0) migrated logging system from log4j1 to log4j2, we should updated the docs as well.

Does this PR introduce any user-facing change?

Yes, docs are updated.

How was this patch tested?

Review.

Was this patch authored or co-authored using generative AI tooling?

No.

@@ -74,7 +74,7 @@ object IntegrationTestUtils {

// Redirect server log into console
"--conf",
s"spark.driver.extraJavaOptions=-Dlog4j.configuration=$log4j2")
s"spark.driver.extraJavaOptions=-Dlog4j.configurationFile=$log4j2")
Copy link
Member Author

@pan3793 pan3793 Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG4J2 should only respect log4j.configurationFile, I'm not sure how the previous code worked. cc @zhenlineo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question.

@pan3793
Copy link
Member Author

pan3793 commented Nov 27, 2024

cc @viirya

docs/running-on-yarn.md Outdated Show resolved Hide resolved
Co-authored-by: Liang-Chi Hsieh <[email protected]>
@pan3793 pan3793 requested a review from viirya November 29, 2024 02:41
@@ -293,7 +293,7 @@ class YarnClusterSuite extends BaseYarnClusterSuite {
}

test("running Spark in yarn-cluster mode displays driver log links") {
val log4jConf = new File(tempDir, "log4j.properties")
val log4jConf = new File(tempDir, "log4j2.properties")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this test actually uses configurationFile so no matter what the filename of properties file is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the renaming is just for consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants