Repository: oozie
Updated Branches:
  refs/heads/master 8aa465979 -> 05fce1f78


OOZIE-2431: Support hive.metastore.uris as alias for hcat.metastore.uri - Fix 
incorrect logic in initial patch


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

Branch: refs/heads/master
Commit: 05fce1f78adf1f7d2899f901fb8f4a9c2b6314b0
Parents: 8aa4659
Author: Rohini Palaniswamy <[email protected]>
Authored: Thu Jan 28 10:13:28 2016 -0800
Committer: Rohini Palaniswamy <[email protected]>
Committed: Thu Jan 28 10:13:28 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/oozie/action/hadoop/HCatCredentials.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/05fce1f7/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 b182c1d..330e6e3 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
@@ -45,13 +45,14 @@ public class HCatCredentials extends Credentials {
     public void addtoJobConf(JobConf jobconf, CredentialsProperties props, 
Context context) throws Exception {
         try {
             String principal = 
props.getProperties().get(HCAT_METASTORE_PRINCIPAL) == null
-                    ? props.getProperties().get(HIVE_METASTORE_PRINCIPAL) : 
null;
+                    ? props.getProperties().get(HIVE_METASTORE_PRINCIPAL)
+                    : props.getProperties().get(HCAT_METASTORE_PRINCIPAL);
             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) == 
null
-                    ? props.getProperties().get(HIVE_METASTORE_URI) : null;
+                    ? props.getProperties().get(HIVE_METASTORE_URI) : 
props.getProperties().get(HCAT_METASTORE_URI);
             if (server == null || server.isEmpty()) {
                 throw new CredentialException(ErrorCode.E0510,
                         HCAT_METASTORE_URI + " is required to get hcat 
credential");

Reply via email to