Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CLOSES OOZIE-37 Documentation related modifications for log -action o…

…ption
  • Loading branch information...
commit 1f1ca0618e8e42226c370f390da4db9c93e1451b 1 parent 825cb6b
Kiran Nagasubramanian kirann authored
33 client/src/main/java/org/apache/oozie/cli/OozieCLI.java
View
@@ -95,7 +95,7 @@
public static final String RERUN_OPTION = "rerun";
public static final String INFO_OPTION = "info";
public static final String LOG_OPTION = "log";
- public static final String LOG_ACTION_OPTION = "action";
+ public static final String ACTION_OPTION = "action";
public static final String DEFINITION_OPTION = "definition";
public static final String CONFIG_CONTENT_OPTION = "configcontent";
@@ -107,7 +107,6 @@
public static final String STATUS_OPTION = "status";
public static final String LOCAL_TIME_OPTION = "localtime";
public static final String QUEUE_DUMP_OPTION = "queuedump";
- public static final String RERUN_ACTION_OPTION = "action";
public static final String RERUN_COORD_OPTION = "coordinator";
public static final String RERUN_DATE_OPTION = "date";
public static final String RERUN_REFRESH_OPTION = "refresh";
@@ -201,12 +200,11 @@ protected Options createJobOptions() {
Option len = new Option(LEN_OPTION, true, "number of actions (default TOTAL ACTIONS, requires -info)");
Option localtime = new Option(LOCAL_TIME_OPTION, false, "use local time (default GMT)");
Option log = new Option(LOG_OPTION, true, "job log");
- Option log_action = new Option(LOG_ACTION_OPTION, true,
- "coordinator log retrieval on action ids (requires -log)");
Option definition = new Option(DEFINITION_OPTION, true, "job definition");
Option config_content = new Option(CONFIG_CONTENT_OPTION, true, "job configuration");
Option verbose = new Option(VERBOSE_OPTION, false, "verbose mode");
- Option rerun_action = new Option(RERUN_ACTION_OPTION, true, "coordinator rerun on action ids (requires -rerun)");
+ Option action = new Option(ACTION_OPTION, true,
+ "coordinator rerun on action ids (requires -rerun); coordinator log retrieval on action ids (requires -log)");
Option rerun_date = new Option(RERUN_DATE_OPTION, true,
"coordinator/bundle rerun on action dates (requires -rerun)");
Option rerun_coord = new Option(RERUN_COORD_OPTION, true, "bundle rerun on coordinator names (requires -rerun)");
@@ -241,12 +239,11 @@ protected Options createJobOptions() {
jobOptions.addOption(verbose);
jobOptions.addOption(offset);
jobOptions.addOption(len);
- jobOptions.addOption(rerun_action);
+ jobOptions.addOption(action);
jobOptions.addOption(rerun_date);
jobOptions.addOption(rerun_coord);
jobOptions.addOption(rerun_refresh);
jobOptions.addOption(rerun_nocleanup);
- jobOptions.addOption(log_action);
jobOptions.addOptionGroup(actions);
return jobOptions;
}
@@ -608,8 +605,8 @@ else if (commandLine.getOptionValue(RERUN_OPTION).contains("-B")) {
String dateScope = null;
boolean refresh = false;
boolean noCleanup = false;
- if (options.contains(RERUN_ACTION_OPTION)) {
- throw new OozieCLIException("Invalid options provided for bundle rerun. " + RERUN_ACTION_OPTION
+ if (options.contains(ACTION_OPTION)) {
+ throw new OozieCLIException("Invalid options provided for bundle rerun. " + ACTION_OPTION
+ " is not valid for bundle rerun");
}
if (options.contains(RERUN_DATE_OPTION)) {
@@ -642,21 +639,21 @@ else if (commandLine.getOptionValue(RERUN_OPTION).contains("-B")) {
String rerunType = null;
boolean refresh = false;
boolean noCleanup = false;
- if (options.contains(RERUN_DATE_OPTION) && options.contains(RERUN_ACTION_OPTION)) {
+ if (options.contains(RERUN_DATE_OPTION) && options.contains(ACTION_OPTION)) {
throw new OozieCLIException("Invalid options provided for rerun: either" + RERUN_DATE_OPTION
- + " or " + RERUN_ACTION_OPTION + " expected. Don't use both at the same time.");
+ + " or " + ACTION_OPTION + " expected. Don't use both at the same time.");
}
if (options.contains(RERUN_DATE_OPTION)) {
rerunType = RestConstants.JOB_COORD_RERUN_DATE;
scope = commandLine.getOptionValue(RERUN_DATE_OPTION);
}
- else if (options.contains(RERUN_ACTION_OPTION)) {
+ else if (options.contains(ACTION_OPTION)) {
rerunType = RestConstants.JOB_COORD_RERUN_ACTION;
- scope = commandLine.getOptionValue(RERUN_ACTION_OPTION);
+ scope = commandLine.getOptionValue(ACTION_OPTION);
}
else {
throw new OozieCLIException("Invalid options provided for rerun: " + RERUN_DATE_OPTION + " or "
- + RERUN_ACTION_OPTION + " expected.");
+ + ACTION_OPTION + " expected.");
}
if (options.contains(RERUN_REFRESH_OPTION)) {
refresh = true;
@@ -704,9 +701,9 @@ else if (options.contains(LOG_OPTION)) {
if (commandLine.getOptionValue(LOG_OPTION).contains("-C")) {
String logRetrievalScope = null;
String logRetrievalType = null;
- if (options.contains(LOG_ACTION_OPTION)) {
+ if (options.contains(ACTION_OPTION)) {
logRetrievalType = RestConstants.JOB_LOG_ACTION;
- logRetrievalScope = commandLine.getOptionValue(LOG_ACTION_OPTION);
+ logRetrievalScope = commandLine.getOptionValue(ACTION_OPTION);
}
try {
wc.getJobLog(commandLine.getOptionValue(LOG_OPTION), logRetrievalType, logRetrievalScope, ps);
@@ -716,11 +713,11 @@ else if (options.contains(LOG_OPTION)) {
}
}
else {
- if (!options.contains(LOG_ACTION_OPTION)) {
+ if (!options.contains(ACTION_OPTION)) {
wc.getJobLog(commandLine.getOptionValue(LOG_OPTION), null, null, ps);
}
else {
- throw new OozieCLIException("Invalid options provided for log retrieval. " + LOG_ACTION_OPTION
+ throw new OozieCLIException("Invalid options provided for log retrieval. " + ACTION_OPTION
+ " is valid only for coordinator job log retrieval");
}
}
12 docs/src/site/twiki/DG_CommandLineTool.twiki
View
@@ -25,7 +25,7 @@ usage:
oozie version : show client version
oozie job <OPTIONS> : job operations
- -action <arg> coordinator rerun on action ids (requires -rerun)
+ -action <arg> coordinator rerun on action ids (requires -rerun); coordinator log retrieval on action ids (requires -log)
-change <arg> change a coordinator/bundle job
-config <arg> job configuration file '.xml' or '.properties'
-D <property=value> set/override value for given property
@@ -361,6 +361,16 @@ $ oozie job -oozie http://localhost:8080/oozie -log 14-20090525161321-oozie-joe
</verbatim>
+---+++ Checking the server logs for particular actions of a Coordinator Job
+
+Example:
+
+<verbatim>
+
+$ oozie job -log <coord_job_id> [-action 1, 3-4, 7-40] (-action is optional.)
+
+</verbatim>
+
---+++ Dryrun of Coordinator Job
* This feature is only supported in Oozie 2.0 or later.
1  release-log.txt
View
@@ -1,5 +1,6 @@
-- Oozie 3.1.0 release
+OOZIE-37 Documentation related modifications for "log -action" option
OOZIE-35 add auto-rerun for error codes JA008 and JA009 in action executor
OOZIE-21 Fixed bug forked subwf not returning status to the parent wf job
OOZIE-28 update coordinator name to coord job at loadstate of coord-submit to avoid exception of bundle-status-update
Please sign in to comment.
Something went wrong with that request. Please try again.