You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ek...@apache.org on 2015/06/13 19:21:15 UTC
hive git commit: HIVE-10992:WebHCat should not create delegation
tokens when Kerberos is not enabled
Repository: hive
Updated Branches:
refs/heads/master 5fd11679a -> 051bf0b17
HIVE-10992:WebHCat should not create delegation tokens when Kerberos is not enabled
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/051bf0b1
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/051bf0b1
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/051bf0b1
Branch: refs/heads/master
Commit: 051bf0b1785262e29a269b76c8aa798e8e85117c
Parents: 5fd1167
Author: Eugene Koifman <ek...@hortonworks.com>
Authored: Sat Jun 13 10:21:02 2015 -0700
Committer: Eugene Koifman <ek...@hortonworks.com>
Committed: Sat Jun 13 10:21:02 2015 -0700
----------------------------------------------------------------------
.../hive/hcatalog/templeton/tool/TempletonControllerJob.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/051bf0b1/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/TempletonControllerJob.java
----------------------------------------------------------------------
diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/TempletonControllerJob.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/TempletonControllerJob.java
index 5c7de80..f47feeb 100644
--- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/TempletonControllerJob.java
+++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/TempletonControllerJob.java
@@ -133,9 +133,10 @@ public class TempletonControllerJob extends Configured implements Tool, JobSubmi
JobClient jc = new JobClient(new JobConf(job.getConfiguration()));
- Token<DelegationTokenIdentifier> mrdt = jc.getDelegationToken(new Text("mr token"));
- job.getCredentials().addToken(new Text("mr token"), mrdt);
-
+ if(UserGroupInformation.isSecurityEnabled()) {
+ Token<DelegationTokenIdentifier> mrdt = jc.getDelegationToken(new Text("mr token"));
+ job.getCredentials().addToken(new Text("mr token"), mrdt);
+ }
String metastoreTokenStrForm = addHMSToken(job, user);
job.submit();