Author: rkanter
Date: Thu Apr 4 20:29:17 2013
New Revision: 1464727
URL: http://svn.apache.org/r1464727
Log:
OOZIE-1205 If the JobTracker is restarted during a Fork, Oozie doesn't fail all
of the currently running actions (rkanter)
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionCheckXCommand.java
oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java
oozie/trunk/release-log.txt
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionCheckXCommand.java
URL:
http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionCheckXCommand.java?rev=1464727&r1=1464726&r2=1464727&view=diff
==============================================================================
---
oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionCheckXCommand.java
(original)
+++
oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionCheckXCommand.java
Thu Apr 4 20:29:17 2013
@@ -44,7 +44,6 @@ import org.apache.oozie.service.ActionSe
import org.apache.oozie.service.JPAService;
import org.apache.oozie.service.Services;
import org.apache.oozie.service.UUIDService;
-import org.apache.oozie.util.InstrumentUtils;
import org.apache.oozie.util.Instrumentation;
import org.apache.oozie.util.LogUtils;
import org.apache.oozie.util.XLog;
@@ -202,7 +201,7 @@ public class ActionCheckXCommand extends
switch (ex.getErrorType()) {
case FAILED:
- failAction(wfJob, wfAction);
+ failJob(context, wfAction);
break;
case ERROR:
handleUserRetry(wfAction);
@@ -235,16 +234,6 @@ public class ActionCheckXCommand extends
return null;
}
- private void failAction(WorkflowJobBean workflow, WorkflowActionBean
action) throws CommandException {
- if (!handleUserRetry(action)) {
- LOG.warn("Failing Job [{0}] due to failed action [{1}]",
workflow.getId(), action.getId());
- action.resetPending();
- action.setStatus(Status.FAILED);
- workflow.setStatus(WorkflowJob.Status.FAILED);
- InstrumentUtils.incrJobCounter(INSTR_FAILED_JOBS_COUNTER, 1,
getInstrumentation());
- }
- }
-
protected long getRetryInterval() {
return (executor != null) ? executor.getRetryInterval() :
ActionExecutor.RETRY_INTERVAL;
}
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java
URL:
http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java?rev=1464727&r1=1464726&r2=1464727&view=diff
==============================================================================
---
oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java
(original)
+++
oozie/trunk/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java
Thu Apr 4 20:29:17 2013
@@ -174,8 +174,18 @@ public abstract class ActionXCommand<T>
public void failJob(ActionExecutor.Context context) throws
CommandException {
ActionExecutorContext aContext = (ActionExecutorContext) context;
WorkflowActionBean action = (WorkflowActionBean) aContext.getAction();
- WorkflowJobBean workflow = (WorkflowJobBean) context.getWorkflow();
+ failJob(context, action);
+ }
+ /**
+ * Fail the job due to failed action
+ *
+ * @param context the execution context.
+ * @param action the action that caused the workflow to fail
+ * @throws CommandException thrown if unable to fail job
+ */
+ public void failJob(ActionExecutor.Context context, WorkflowActionBean
action) throws CommandException {
+ WorkflowJobBean workflow = (WorkflowJobBean) context.getWorkflow();
if (!handleUserRetry(action)) {
incrActionErrorCounter(action.getType(), "failed", 1);
LOG.warn("Failing Job due to failed action [{0}]",
action.getName());
Modified: oozie/trunk/release-log.txt
URL:
http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1464727&r1=1464726&r2=1464727&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Thu Apr 4 20:29:17 2013
@@ -1,5 +1,6 @@
-- Oozie 4.1.0 release (trunk - unreleased)
+OOZIE-1205 If the JobTracker is restarted during a Fork, Oozie doesn't fail
all of the currently running actions (rkanter)
OOZIE-1286 SSH Action does not properly handle arguments that have spaces
(rkanter)
OOZIE-1300 [Doc] Error in the the email action XML schema (harsh)
OOZIE-1288 Improve docs around -D arguments support in the Oozie CLI's pig
subcommand (harsh)