hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ekoif...@apache.org
Subject hive git commit: HIVE-10992:WebHCat should not create delegation tokens when Kerberos is not enabled
Date Sat, 13 Jun 2015 17:29:09 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1.2 0a90c2bef -> 2b340b0f9


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/2b340b0f
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/2b340b0f
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/2b340b0f

Branch: refs/heads/branch-1.2
Commit: 2b340b0f97d62529ebe4b345551014bb061856d9
Parents: 0a90c2b
Author: Eugene Koifman <ekoifman@hortonworks.com>
Authored: Sat Jun 13 10:29:03 2015 -0700
Committer: Eugene Koifman <ekoifman@hortonworks.com>
Committed: Sat Jun 13 10:29:03 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/2b340b0f/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();


Mime
View raw message