You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by rk...@apache.org on 2014/06/01 08:09:55 UTC

[2/2] git commit: OOZIE-1828 Introduce counters JobStatus terminal states metrics (rkanter)

OOZIE-1828 Introduce counters JobStatus terminal states metrics (rkanter)


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

Branch: refs/heads/master
Commit: b6769f4ddac8f983c1695f565ec320437a79ebd2
Parents: 83af85c
Author: Robert Kanter <rk...@cloudera.com>
Authored: Sat May 31 23:02:50 2014 -0700
Committer: Robert Kanter <rk...@cloudera.com>
Committed: Sat May 31 23:02:50 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/oozie/command/wf/ActionXCommand.java   | 4 +---
 .../main/java/org/apache/oozie/command/wf/SignalXCommand.java   | 3 +--
 .../main/java/org/apache/oozie/command/wf/WorkflowXCommand.java | 5 +++++
 release-log.txt                                                 | 1 +
 4 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/b6769f4d/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java b/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java
index e38540f..0c4c548 100644
--- a/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java
+++ b/core/src/main/java/org/apache/oozie/command/wf/ActionXCommand.java
@@ -58,8 +58,6 @@ import org.apache.oozie.workflow.lite.LiteWorkflowInstance;
 public abstract class ActionXCommand<T> extends WorkflowXCommand<Void> {
     private static final String INSTRUMENTATION_GROUP = "action.executors";
 
-    protected static final String INSTR_FAILED_JOBS_COUNTER = "failed";
-
     protected static final String RECOVERY_ID_SEPARATOR = "@";
 
     public ActionXCommand(String name, String type, int priority) {
@@ -197,7 +195,7 @@ public abstract class ActionXCommand<T> extends WorkflowXCommand<Void> {
                 action.resetPending();
                 queue(new NotificationXCommand(workflow, action));
                 queue(new KillXCommand(workflow.getId()));
-                InstrumentUtils.incrJobCounter(INSTR_FAILED_JOBS_COUNTER, 1, getInstrumentation());
+                InstrumentUtils.incrJobCounter(INSTR_FAILED_JOBS_COUNTER_NAME, 1, getInstrumentation());
             }
             catch (WorkflowException ex) {
                 throw new CommandException(ex);

http://git-wip-us.apache.org/repos/asf/oozie/blob/b6769f4d/core/src/main/java/org/apache/oozie/command/wf/SignalXCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/command/wf/SignalXCommand.java b/core/src/main/java/org/apache/oozie/command/wf/SignalXCommand.java
index 5c457f8..7968973 100644
--- a/core/src/main/java/org/apache/oozie/command/wf/SignalXCommand.java
+++ b/core/src/main/java/org/apache/oozie/command/wf/SignalXCommand.java
@@ -73,8 +73,6 @@ import org.apache.oozie.client.OozieClient;
 @SuppressWarnings("deprecation")
 public class SignalXCommand extends WorkflowXCommand<Void> {
 
-    protected static final String INSTR_SUCCEEDED_JOBS_COUNTER_NAME = "succeeded";
-
     private JPAService jpaService = null;
     private String jobId;
     private String actionId;
@@ -282,6 +280,7 @@ public class SignalXCommand extends WorkflowXCommand<Void> {
                     boolean isUserRetry = false;
                     ActionExecutorContext context = new ActionXCommand.ActionExecutorContext(wfJob, wfAction, isRetry,
                             isUserRetry);
+                    InstrumentUtils.incrJobCounter(INSTR_KILLED_JOBS_COUNTER_NAME, 1, getInstrumentation());
                     try {
                         String tmpNodeConf = nodeDef.getConf();
                         String actionConf = context.getELEvaluator().evaluate(tmpNodeConf, String.class);

http://git-wip-us.apache.org/repos/asf/oozie/blob/b6769f4d/core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java b/core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java
index 0eee6b1..8995fd2 100644
--- a/core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java
+++ b/core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java
@@ -32,6 +32,11 @@ import org.apache.oozie.event.WorkflowJobEvent;
  * @param <T>
  */
 public abstract class WorkflowXCommand<T> extends XCommand<T> {
+
+    protected static final String INSTR_SUCCEEDED_JOBS_COUNTER_NAME = "succeeded";
+    protected static final String INSTR_KILLED_JOBS_COUNTER_NAME = "killed";
+    protected static final String INSTR_FAILED_JOBS_COUNTER_NAME = "failed";
+
     /**
      * Base class constructor for workflow commands.
      *

http://git-wip-us.apache.org/repos/asf/oozie/blob/b6769f4d/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index e7eaa1e..05894cf 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.1.0 release (trunk - unreleased)
 
+OOZIE-1828 Introduce counters JobStatus terminal states metrics (rkanter)
 OOZIE-1724 Make it easier to specify the HCat hive-site.xml for the Oozie Server (rkanter)
 OOZIE-1812 Bundle status is always in RUNNING if one of the action status is in PREP (puru via rohini)
 OOZIE-1848 Pig actions fail due to missing joda-time jar from pig sharelib (bzhang)