This is an automated email from the ASF dual-hosted git repository.
srowen 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 3c77fb3b583 [MINOR][SQL] Print stacktrace when NoClassDefFoundError in
HiveDelegationToken
3c77fb3b583 is described below
commit 3c77fb3b58319f76c3ae62f8a2975f6fbda9abe0
Author: yangjiang <[email protected]>
AuthorDate: Fri Sep 9 18:16:48 2022 -0500
[MINOR][SQL] Print stacktrace when NoClassDefFoundError in
HiveDelegationToken
### What changes were proposed in this pull request?
When i get `HiveDelegationToken` in spark-subimit cluster mode, It failed
without stack trace. I think its better add it for trouble shooting.
before
```
2022-09-02T07:56:43,897 WARN [main] security.HiveDelegationTokenProvider :
You are attempting to use the
org.apache.spark.sql.hive.security.HiveDelegationTokenProvider, but your Spark
distribution is not built with Hive libraries
```
After will print the before message + NoSuchMethod..... (sorry for lost the
log)
### Why are the changes needed?
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
Closes #37806 from Ted-Jiang/fix_log.
Authored-by: yangjiang <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
---
.../apache/spark/sql/hive/security/HiveDelegationTokenProvider.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/security/HiveDelegationTokenProvider.scala
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/security/HiveDelegationTokenProvider.scala
index 08c1c88a71b..253c0a9ebaf 100644
---
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/security/HiveDelegationTokenProvider.scala
+++
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/security/HiveDelegationTokenProvider.scala
@@ -54,7 +54,7 @@ private[spark] class HiveDelegationTokenProvider
logWarning("Fail to create Hive Configuration", e)
hadoopConf
case e: NoClassDefFoundError =>
- logWarning(classNotFoundErrorStr)
+ logWarning(classNotFoundErrorStr, e)
hadoopConf
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]