| commit | c6ef20089e4f1d2869c362c1d7d08ccdc6225dfa | [log] [tgz] |
|---|---|---|
| author | Kent Yao <yaooqinn@hotmail.com> | Wed Oct 23 16:02:23 2019 +0800 |
| committer | GitHub <noreply@github.com> | Wed Oct 23 16:02:23 2019 +0800 |
| tree | 69309270d2306ad009d149b1b332c967319a4cf5 | |
| parent | 191b8171d61925dcd4d71d242bfc27f3054bacab [diff] |
[KYUUBI-219]Fix NPE in HiveTokenCollector (#220)
diff --git a/kyuubi-server/src/main/scala/yaooqinn/kyuubi/session/security/HiveTokenCollector.scala b/kyuubi-server/src/main/scala/yaooqinn/kyuubi/session/security/HiveTokenCollector.scala index 873b4c0..79fd302 100644 --- a/kyuubi-server/src/main/scala/yaooqinn/kyuubi/session/security/HiveTokenCollector.scala +++ b/kyuubi-server/src/main/scala/yaooqinn/kyuubi/session/security/HiveTokenCollector.scala
@@ -44,7 +44,7 @@ val currentUser = UserGroupInformation.getCurrentUser.getUserName val credentials = new Credentials() KyuubiHadoopUtil.doAsRealUser { - val hive = Hive.get(c, classOf[HiveConf]) + val hive = Hive.get(c, true) info(s"Getting token from Hive Metastore for owner $currentUser via $principal") val tokenString = hive.getDelegationToken(currentUser, principal) val token = new Token[DelegationTokenIdentifier]