Github user wangyum commented on a diff in the pull request:
https://github.com/apache/spark/pull/20866#discussion_r176906474
--- Diff:
core/src/main/scala/org/apache/spark/deploy/security/HiveDelegationTokenProvider.scala
---
@@ -92,8 +94,9 @@ private[security] class HiveDelegationTokenProvider
s"$principal at $metastoreUri")
doAsRealUser {
- val hive = Hive.get(conf, classOf[HiveConf])
- val tokenStr = hive.getDelegationToken(currentUser.getUserName(),
principal)
+ metastoreClient =
RetryingMetaStoreClient.getProxy(conf.asInstanceOf[HiveConf], null,
--- End diff --
HiveMetaStoreClient -> RetryingMetaStoreClient. In fact, `Hive.get` also
uses `RetryingMetaStoreClient`:
```
at
org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1521)
at
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:86)
at
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:132)
at
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:104)
at
org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3005)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3024)
at org.apache.hadoop.hive.ql.metadata.Hive.getAllDatabases(Hive.java:1234)
at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:174)
at org.apache.hadoop.hive.ql.metadata.Hive.<clinit>(Hive.java:166)
at
org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:503)
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]