hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject hive git commit: HIVE-10564 : webhcat should use webhcat-site.xml properties for controller job submission (Thejas Nair, reivewed by Eugene Koifman)
Date Mon, 04 May 2015 22:16:37 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1.2 29f588e3a -> d7b96aea4


HIVE-10564 : webhcat should use webhcat-site.xml properties for controller job submission
(Thejas Nair, reivewed by Eugene Koifman)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/d7b96aea
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/d7b96aea
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/d7b96aea

Branch: refs/heads/branch-1.2
Commit: d7b96aea4aca308cecb6f48257a5fb241a05faba
Parents: 29f588e
Author: Thejas Nair <thejas@hortonworks.com>
Authored: Mon May 4 15:16:12 2015 -0700
Committer: Thejas Nair <thejas@hortonworks.com>
Committed: Mon May 4 15:16:30 2015 -0700

----------------------------------------------------------------------
 .../hcatalog/templeton/tool/TempletonControllerJob.java  | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/d7b96aea/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 92e45cb..1f8ebf3 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
@@ -56,7 +56,7 @@ import org.apache.thrift.TException;
  * - run a keep alive thread so the job doesn't end.
  * - Optionally, store the stdout, stderr, and exit value of the child
  *   in hdfs files.
- *   
+ *
  * A note on security.  When jobs are submitted through WebHCat that use HCatalog, it means
that
  * metastore access is required.  Hive queries, of course, need metastore access.  This in
turn
  * requires delegation token to be obtained for metastore in a <em>secure cluster</em>.
 Since we
@@ -80,6 +80,11 @@ public class TempletonControllerJob extends Configured implements Tool,
JobSubmi
     this.appConf = conf;
   }
 
+  @Override
+  public Configuration getConf() {
+    return appConf;
+  }
+
   private JobID submittedJobId;
 
   public String getSubmittedId() {
@@ -95,7 +100,7 @@ public class TempletonControllerJob extends Configured implements Tool,
JobSubmi
    * @see org.apache.hive.hcatalog.templeton.CompleteDelegator
    */
   @Override
-  public int run(String[] args) throws IOException, InterruptedException, ClassNotFoundException,

+  public int run(String[] args) throws IOException, InterruptedException, ClassNotFoundException,
           TException {
     if(LOG.isDebugEnabled()) {
       LOG.debug("Preparing to submit job: " + Arrays.toString(args));
@@ -169,9 +174,11 @@ public class TempletonControllerJob extends Configured implements Tool,
JobSubmi
     final UserGroupInformation ugi = UgiFactory.getUgi(user);
     UserGroupInformation real = ugi.getRealUser();
     return real.doAs(new PrivilegedExceptionAction<String>() {
+      @Override
       public String run() throws IOException, TException, InterruptedException  {
         final HiveMetaStoreClient client = new HiveMetaStoreClient(c);
         return ugi.doAs(new PrivilegedExceptionAction<String>() {
+          @Override
           public String run() throws IOException, TException, InterruptedException {
             String u = ugi.getUserName();
             return client.getDelegationToken(u);


Mime
View raw message