You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/07 23:28:56 UTC

[GitHub] [spark] sunchao commented on a change in pull request #34822: [SPARK-37561][SQL] Avoid loading all functions when obtaining hive's DelegationToken

sunchao commented on a change in pull request #34822:
URL: https://github.com/apache/spark/pull/34822#discussion_r764438096



##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/security/HiveDelegationTokenProvider.scala
##########
@@ -99,7 +99,18 @@ private[spark] class HiveDelegationTokenProvider
         s"$principal at $metastoreUri")
 
       doAsRealUser {
-        val hive = Hive.get(conf, classOf[HiveConf])
+        val hive = conf match {
+          case hiveConf: HiveConf =>
+            try {

Review comment:
       can we reduce the code duplication by moving `HiveClientImpl.getHive` to its companion object and then call the method here?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org