You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by ro...@apache.org on 2014/03/24 20:04:18 UTC

git commit: OOZIE-1751 Default authentication type using env variable for oozie CLI (puru via rohini)

Repository: oozie
Updated Branches:
  refs/heads/master 50fd33c5f -> b94bcf4d1


OOZIE-1751 Default authentication type using env variable for oozie CLI (puru via rohini)


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

Branch: refs/heads/master
Commit: b94bcf4d1efc13edb0be0ffd8697b9cf28266253
Parents: 50fd33c
Author: Rohini Palaniswamy <ro...@yahoo-inc.com>
Authored: Mon Mar 24 12:04:12 2014 -0700
Committer: Rohini Palaniswamy <ro...@yahoo-inc.com>
Committed: Mon Mar 24 12:04:12 2014 -0700

----------------------------------------------------------------------
 client/src/main/java/org/apache/oozie/cli/OozieCLI.java | 8 ++++++++
 docs/src/site/twiki/DG_CommandLineTool.twiki            | 1 +
 release-log.txt                                         | 1 +
 3 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/b94bcf4d/client/src/main/java/org/apache/oozie/cli/OozieCLI.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/oozie/cli/OozieCLI.java b/client/src/main/java/org/apache/oozie/cli/OozieCLI.java
index 87e2f27..a6203c6 100644
--- a/client/src/main/java/org/apache/oozie/cli/OozieCLI.java
+++ b/client/src/main/java/org/apache/oozie/cli/OozieCLI.java
@@ -80,6 +80,7 @@ public class OozieCLI {
     public static final String ENV_OOZIE_URL = "OOZIE_URL";
     public static final String ENV_OOZIE_DEBUG = "OOZIE_DEBUG";
     public static final String ENV_OOZIE_TIME_ZONE = "OOZIE_TIMEZONE";
+    public static final String ENV_OOZIE_AUTH = "OOZIE_AUTH";
     public static final String WS_HEADER_PREFIX = "header:";
 
     public static final String HELP_CMD = "help";
@@ -154,6 +155,7 @@ public class OozieCLI {
     private static final String[] OOZIE_HELP = {
             "the env variable '" + ENV_OOZIE_URL + "' is used as default value for the '-" + OOZIE_OPTION + "' option",
             "the env variable '" + ENV_OOZIE_TIME_ZONE + "' is used as default value for the '-" + TIME_ZONE_OPTION + "' option",
+            "the env variable '" + ENV_OOZIE_AUTH + "' is used as default value for the '-" + AUTH_OPTION + "' option",
             "custom headers for Oozie web services can be specified using '-D" + WS_HEADER_PREFIX + "NAME=VALUE'" };
 
     private static final String RULER;
@@ -741,6 +743,12 @@ public class OozieCLI {
      */
     protected String getAuthOption(CommandLine commandLine) {
         String authOpt = commandLine.getOptionValue(AUTH_OPTION);
+        if (authOpt == null) {
+            authOpt = System.getenv(ENV_OOZIE_AUTH);
+        }
+        if (commandLine.hasOption(DEBUG_OPTION)) {
+            System.out.println(" Auth type : " + authOpt);
+        }
         return authOpt;
     }
 

http://git-wip-us.apache.org/repos/asf/oozie/blob/b94bcf4d/docs/src/site/twiki/DG_CommandLineTool.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/DG_CommandLineTool.twiki b/docs/src/site/twiki/DG_CommandLineTool.twiki
index 0748ff8..c13b78a 100644
--- a/docs/src/site/twiki/DG_CommandLineTool.twiki
+++ b/docs/src/site/twiki/DG_CommandLineTool.twiki
@@ -19,6 +19,7 @@ The =oozie= CLI interacts with Oozie via its WS API.
 usage:
       the env variable 'OOZIE_URL' is used as default value for the '-oozie' option
       the env variable 'OOZIE_TIMEZONE' is used as default value for the '-timezone' option
+      the env variable 'OOZIE_AUTH' is used as default value for the '-auth' option
       custom headers for Oozie web services can be specified using '-Dheader:NAME=VALUE'
 
       oozie help : display usage

http://git-wip-us.apache.org/repos/asf/oozie/blob/b94bcf4d/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index fe5bd8c..f97c3f8 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.1.0 release (trunk - unreleased)
 
+OOZIE-1751 Default authentication type using env variable for oozie CLI (puru via rohini)
 OOZIE-1753 Update create-release-artifact script for git (rkanter)
 OOZIE-1704 Add ability to use Bulk API with bundle ID (mona)
 OOZIE-1718 Coord Job Query UPDATE_COORD_JOB_CHANGE does not update last modified time (mona)