You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by pu...@apache.org on 2016/01/26 21:53:10 UTC

oozie git commit: OOZIE-2431 Support hive.metastore.uris as alias for hcat.metastore.uri

Repository: oozie
Updated Branches:
  refs/heads/master 81ce22b6f -> ff3c2956d


OOZIE-2431 Support hive.metastore.uris as alias for hcat.metastore.uri


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

Branch: refs/heads/master
Commit: ff3c2956dbbda7cad10c18a6d9df5ed745fcf130
Parents: 81ce22b
Author: Purshotam Shah <pu...@yahoo-inc.com>
Authored: Tue Jan 26 12:53:04 2016 -0800
Committer: Purshotam Shah <pu...@yahoo-inc.com>
Committed: Tue Jan 26 12:53:04 2016 -0800

----------------------------------------------------------------------
 .../org/apache/oozie/action/hadoop/HCatCredentials.java  | 11 ++++++-----
 docs/src/site/twiki/DG_ActionAuthentication.twiki        |  4 ++--
 release-log.txt                                          |  1 +
 3 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/ff3c2956/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentials.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentials.java b/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentials.java
index 184ad31..b182c1d 100644
--- a/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentials.java
+++ b/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentials.java
@@ -21,9 +21,6 @@ package org.apache.oozie.action.hadoop;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.oozie.ErrorCode;
 import org.apache.oozie.action.ActionExecutor.Context;
-import org.apache.oozie.action.hadoop.CredentialException;
-import org.apache.oozie.action.hadoop.Credentials;
-import org.apache.oozie.action.hadoop.CredentialsProperties;
 import org.apache.oozie.util.XLog;
 
 /**
@@ -38,6 +35,8 @@ public class HCatCredentials extends Credentials {
 
     private static final String HCAT_METASTORE_PRINCIPAL = "hcat.metastore.principal";
     private static final String HCAT_METASTORE_URI = "hcat.metastore.uri";
+    private static final String HIVE_METASTORE_PRINCIPAL = "hive.metastore.kerberos.principal";
+    private static final String HIVE_METASTORE_URI = "hive.metastore.uris";
 
     /* (non-Javadoc)
      * @see org.apache.oozie.action.hadoop.Credentials#addtoJobConf(org.apache.hadoop.mapred.JobConf, org.apache.oozie.action.hadoop.CredentialsProperties, org.apache.oozie.action.ActionExecutor.Context)
@@ -45,12 +44,14 @@ public class HCatCredentials extends Credentials {
     @Override
     public void addtoJobConf(JobConf jobconf, CredentialsProperties props, Context context) throws Exception {
         try {
-            String principal = props.getProperties().get(HCAT_METASTORE_PRINCIPAL);
+            String principal = props.getProperties().get(HCAT_METASTORE_PRINCIPAL) == null
+                    ? props.getProperties().get(HIVE_METASTORE_PRINCIPAL) : null;
             if (principal == null || principal.isEmpty()) {
                 throw new CredentialException(ErrorCode.E0510,
                         HCAT_METASTORE_PRINCIPAL + " is required to get hcat credential");
             }
-            String server = props.getProperties().get(HCAT_METASTORE_URI);
+            String server = props.getProperties().get(HCAT_METASTORE_URI) == null
+                    ? props.getProperties().get(HIVE_METASTORE_URI) : null;
             if (server == null || server.isEmpty()) {
                 throw new CredentialException(ErrorCode.E0510,
                         HCAT_METASTORE_URI + " is required to get hcat credential");

http://git-wip-us.apache.org/repos/asf/oozie/blob/ff3c2956/docs/src/site/twiki/DG_ActionAuthentication.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/DG_ActionAuthentication.twiki b/docs/src/site/twiki/DG_ActionAuthentication.twiki
index e980e02..752355a 100644
--- a/docs/src/site/twiki/DG_ActionAuthentication.twiki
+++ b/docs/src/site/twiki/DG_ActionAuthentication.twiki
@@ -111,8 +111,8 @@ Oozie currently comes with the following Credentials implementations:
 
 HCatCredentials requires these two properties:
 
-   1. =hcat.metastore.principal=
-   1. =hcat.metastore.uri=
+   1. =hcat.metastore.principal= or hive.metastore.kerberos.principal
+   1. =hcat.metastore.uri= or hive.metastore.uris
 
 *Note:* The HCatalog Metastore and Hive Metastore are one and the same and so the "hcat" type credential can also be used to talk
 to a secure Hive Metastore, though the property names would still start with "hcat.".

http://git-wip-us.apache.org/repos/asf/oozie/blob/ff3c2956/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 9639b0c..e3925de 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.3.0 release (trunk - unreleased)
 
+OOZIE-2431 Support hive.metastore.uris as alias for hcat.metastore.uri (satishsaley via puru)
 OOZIE-1976 Specifying coordinator input datasets in more logical ways (puru)
 OOZIE-2444 Need conditional logic in bundles (satishsaley via puru)
 OOZIE-2394 Oozie can execute command without holding lock (puru)