falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srik...@apache.org
Subject falcon git commit: Revert "FALCON-991 consolidate get coord actions in OozieWorkflowEngine. Contributed by Ajay Yadav"
Date Tue, 07 Jul 2015 06:33:36 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 0457a1eff -> 618f717d3


Revert "FALCON-991 consolidate get coord actions in OozieWorkflowEngine. Contributed by Ajay
Yadav"

This reverts commit 0457a1eff55a9cb37e9fc51e1df44ca3b2127223.


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

Branch: refs/heads/master
Commit: 618f717d390319a8dbc022c7da1effad6eb10589
Parents: 0457a1e
Author: Srikanth Sundarrajan <sriksun@apache.org>
Authored: Tue Jul 7 11:21:10 2015 +0530
Committer: Srikanth Sundarrajan <sriksun@apache.org>
Committed: Tue Jul 7 11:21:10 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  3 ---
 .../workflow/engine/OozieWorkflowEngine.java    | 27 +++++++++++---------
 2 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/618f717d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 68ebf31..d2d589e 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -9,9 +9,6 @@ Trunk (Unreleased)
     FALCON-796 Enable users to triage data processing issues through falcon (Ajay Yadava)
     
   IMPROVEMENTS
-    FALCON-991 consolidate get coord actions in OozieWorkflowEngine (Ajay Yadav via Srikanth
-    Sundarrajan)
-
     FALCON-1186 Add filtering capability to result of instance summary (Suhas Vasu)
 
     FALCON-1293 Update CHANGES.txt to change 0.6.1 branch to release (Shaik Idris Ali via
Ajay Yadava)

http://git-wip-us.apache.org/repos/asf/falcon/blob/618f717d/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
b/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
index fc3a4ef..4085b8f 100644
--- a/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
+++ b/oozie/src/main/java/org/apache/falcon/workflow/engine/OozieWorkflowEngine.java
@@ -648,10 +648,10 @@ public class OozieWorkflowEngine extends AbstractWorkflowEngine {
 
                 CoordinatorJob coordJob;
                 try {
-                    coordJob = client.getCoordJobInfo(coord.getId(), "nominaltime>=" +
start + ";nominaltime<" + end,
-                            0, Integer.MAX_VALUE);
+                    coordJob = client.getCoordJobInfo(coord.getId(), null, startActionNumber,
+                        (lastMaterializedActionNumber - startActionNumber));
                 } catch (OozieClientException e) {
-                    LOG.error("Unable to get details for coordinator {}", coord.getId(),
e);
+                    LOG.debug("Unable to get details for coordinator {}", coord.getId(),
e);
                     throw new FalconException(e);
                 }
 
@@ -924,15 +924,18 @@ public class OozieWorkflowEngine extends AbstractWorkflowEngine {
                 endCal.setTime(EntityUtil.getNextStartTime(coord.getStartTime(), freq, tz,
iterEnd));
                 endCal.add(freq.getTimeUnit().getCalendarUnit(), -(Integer.valueOf((coord.getFrequency()))));
 
-                try {
-                    int len = retentionCoord ? maxRetentionInstancesCount : Integer.MAX_VALUE;
-                    CoordinatorJob job = client.getCoordJobInfo(coord.getId(), "nominaltime>="
+ start
-                                    + ";nominaltime<" + end, 0, len);
-                    actions = job.getActions();
-                } catch (OozieClientException e) {
-                    LOG.error("Unable to getcoordinator job for:{} for start:{} and end:
{}", coord.getId(),
-                            start, end, e);
-                    throw new FalconException(e);
+                while (start.compareTo(endCal.getTime()) <= 0) {
+                    if (retentionCoord) {
+                        if (retentionInstancesCount >= maxRetentionInstancesCount) {
+                            break;
+                        }
+                        retentionInstancesCount++;
+                    }
+
+                    int sequence = EntityUtil.getInstanceSequence(coord.getStartTime(), freq,
tz, endCal.getTime());
+                    String actionId = coord.getId() + "@" + sequence;
+                    addCoordAction(client, actions, actionId);
+                    endCal.add(freq.getTimeUnit().getCalendarUnit(), -(Integer.valueOf((coord.getFrequency()))));
                 }
             }
             actionsMap.put(cluster, actions);


Mime
View raw message