This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new c29b127dcdd9 [SPARK-45906][YARN] Fix error message extraction from
ResourceNotFoundException
c29b127dcdd9 is described below
commit c29b127dcdd99b0038e96b90177b44b828b32c4b
Author: Cheng Pan <[email protected]>
AuthorDate: Mon Nov 13 19:31:22 2023 +0800
[SPARK-45906][YARN] Fix error message extraction from
ResourceNotFoundException
### What changes were proposed in this pull request?
This PR aims to fix the error message extraction from
`ResourceNotFoundException`, the current wrong implementation also has a
potential NPE issue.
### Why are the changes needed?
This bug is introduced in SPARK-43202, previously, `e.getCause()` is used
to unwrap `InvocationTargetException`, after replacing reflection invocation
with direct API calling, we should not apply `getCause()`.
### Does this PR introduce _any_ user-facing change?
Yes, bug fix.
### How was this patch tested?
Review.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #43782 from pan3793/SPARK-45906.
Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
---
.../main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala
b/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala
index 0dd4e0a6c8ad..f9aa11c4d48d 100644
---
a/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala
+++
b/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala
@@ -168,7 +168,7 @@ private object ResourceRequestHelper extends Logging {
if (numResourceErrors < 2) {
logWarning(s"YARN doesn't know about resource $name, your resource
discovery " +
s"has to handle properly discovering and isolating the resource!
Error: " +
- s"${e.getCause.getMessage}")
+ s"${e.getMessage}")
numResourceErrors += 1
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]