You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pr...@apache.org on 2015/05/07 03:21:12 UTC
[18/52] [abbrv] hive git commit: HIVE-10564 : webhcat should use
webhcat-site.xml properties for controller job submission (Thejas Nair,
reivewed by Eugene Koifman)
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/db69525e
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/db69525e
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/db69525e
Branch: refs/heads/llap
Commit: db69525e7265ec28590218b8fa9e0d40606a1c10
Parents: 8fb8052
Author: Thejas Nair <th...@hortonworks.com>
Authored: Mon May 4 15:16:12 2015 -0700
Committer: Thejas Nair <th...@hortonworks.com>
Committed: Mon May 4 15:16:12 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/db69525e/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);