-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-51164][CORE][TESTS] Fix CallerContext test by enabling hadoop.caller.context.enabled
#49893
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
Conversation
…op.caller.context.enabled`
cnauroth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 (non-binding)
This will remove the need for the test helper I proposed on #49858. Thanks, @dongjoon-hyun !
|
Thank you, @cnauroth ! |
| if (CallerContext.callerContextEnabled) { | ||
| assert(s"SPARK_$context" === HadoopCallerContext.getCurrent.toString) | ||
| } | ||
| assert(s"SPARK_$context" === HadoopCallerContext.getCurrent.toString) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe consider adding an assert-not-null like in the #49858 test? If this isn't working, or if someone disables it in pom.xml, then toString will cause NPE instead of an assertion failure message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NPE is already enough to detect the failure. :)
|
Could you review this when you have some time, @sunchao ? |
sunchao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the ping @dongjoon-hyun
|
Thank you so much, @sunchao ! |
…op.caller.context.enabled` ### What changes were proposed in this pull request? This PR aims to fix `CallerContext` test by enabling `hadoop.caller.context.enabled` during tests. ### Why are the changes needed? This test case was disabled since Apache Spark 2.1.0 because `CallerContext` was supported since Apache Hadoop 2.8+. - #15377 We need to recover `CallerContext` test coverage. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #49893 from dongjoon-hyun/SPARK-51164. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit d07b560) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
…op.caller.context.enabled` ### What changes were proposed in this pull request? This PR aims to fix `CallerContext` test by enabling `hadoop.caller.context.enabled` during tests. ### Why are the changes needed? This test case was disabled since Apache Spark 2.1.0 because `CallerContext` was supported since Apache Hadoop 2.8+. - #15377 We need to recover `CallerContext` test coverage. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #49893 from dongjoon-hyun/SPARK-51164. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit d07b560) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
|
@dongjoon-hyun and @sunchao , FYI, this might need a small follow-up: #49898 . Thank you. |
|
Ack, @cnauroth . |
|
ok, so with this #49779 doesn't need the changes in the production code, it can just
happy |
…op.caller.context.enabled` ### What changes were proposed in this pull request? This PR aims to fix `CallerContext` test by enabling `hadoop.caller.context.enabled` during tests. ### Why are the changes needed? This test case was disabled since Apache Spark 2.1.0 because `CallerContext` was supported since Apache Hadoop 2.8+. - apache#15377 We need to recover `CallerContext` test coverage. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#49893 from dongjoon-hyun/SPARK-51164. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 9edaf80) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
This PR aims to fix
CallerContexttest by enablinghadoop.caller.context.enabledduring tests.Why are the changes needed?
This test case was disabled since Apache Spark 2.1.0 because
CallerContextwas supported since Apache Hadoop 2.8+.We need to recover
CallerContexttest coverage.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass the CIs.
Was this patch authored or co-authored using generative AI tooling?
No.