falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [3/8] incubator-falcon git commit: FALCON-766 Falcon workflow rerun by default should rerun only Failed nodes and remove continue option. Contributed by Shaik Idris Ali
Date Fri, 14 Nov 2014 02:54:48 GMT
FALCON-766 Falcon workflow rerun by default should rerun only Failed nodes and remove continue
option. Contributed by Shaik Idris Ali


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

Branch: refs/heads/master
Commit: 32aaa8ed45971f01bb838ce3c6f40f84ca2a91f8
Parents: 839d250
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Thu Nov 13 17:54:46 2014 -0800
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Thu Nov 13 17:54:46 2014 -0800

----------------------------------------------------------------------
 CHANGES.txt                                               |  3 +++
 client/src/main/java/org/apache/falcon/cli/FalconCLI.java | 10 ----------
 .../main/java/org/apache/falcon/client/FalconClient.java  | 10 ----------
 .../falcon/workflow/engine/OozieWorkflowEngine.java       |  4 ++--
 .../src/test/java/org/apache/falcon/cli/FalconCLIIT.java  |  6 +++---
 5 files changed, 8 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/32aaa8ed/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f313e63..36e5ba8 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -41,6 +41,9 @@ Trunk (Unreleased)
    FALCON-263 API to get workflow parameters. (pavan kumar kolamuri via Shwetha GS)
 
   IMPROVEMENTS
+   FALCON-766 Falcon workflow rerun by default should rerun only Failed nodes
+   and remove continue option (Shaik Idris Ali via Venkatesh Seetharam)
+
    FALCON-744 Document existing falcon data archival to cloud store
    (Venkatesh Seetharam)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/32aaa8ed/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/cli/FalconCLI.java b/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
index f85f53c..c4fc20f 100644
--- a/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
+++ b/client/src/main/java/org/apache/falcon/cli/FalconCLI.java
@@ -100,7 +100,6 @@ public class FalconCLI {
     public static final String RUNNING_OPT = "running";
     public static final String KILL_OPT = "kill";
     public static final String RERUN_OPT = "rerun";
-    public static final String CONTINUE_OPT = "continue";
     public static final String LOG_OPT = "logs";
     public static final String RUNID_OPT = "runid";
     public static final String CLUSTERS_OPT = "clusters";
@@ -270,8 +269,6 @@ public class FalconCLI {
             validateNotEmpty(end, END_OPT);
             result = client.rerunInstances(type, entity, start, end, filePath, colo, clusters,
sourceClusters,
                     lifeCycles);
-        } else if (optionsList.contains(CONTINUE_OPT)) {
-            result = client.rerunInstances(type, entity, start, end, colo, clusters, sourceClusters,
lifeCycles);
         } else if (optionsList.contains(LOG_OPT)) {
             validateOrderBy(orderBy, instanceAction);
             validateFilterBy(filterBy, instanceAction);
@@ -684,12 +681,6 @@ public class FalconCLI {
                 "Reruns process instances for a given process in the range start time and
"
                         + "optional end time and overrides properties present in job.properties
file");
 
-        Option continues = new Option(
-                CONTINUE_OPT,
-                false,
-                "resume process instance execution for a given process in the range start
time and "
-                        + "optional end time and overrides properties present in job.properties
file");
-
         Option logs = new Option(
                 LOG_OPT,
                 false,
@@ -717,7 +708,6 @@ public class FalconCLI {
         group.addOption(resume);
         group.addOption(rerun);
         group.addOption(logs);
-        group.addOption(continues);
         group.addOption(params);
         group.addOption(listing);
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/32aaa8ed/client/src/main/java/org/apache/falcon/client/FalconClient.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/falcon/client/FalconClient.java b/client/src/main/java/org/apache/falcon/client/FalconClient.java
index 7ac2981..9a286ed 100644
--- a/client/src/main/java/org/apache/falcon/client/FalconClient.java
+++ b/client/src/main/java/org/apache/falcon/client/FalconClient.java
@@ -468,16 +468,6 @@ public class FalconClient {
                 getServletInputStream(clusters, sourceClusters, temp), null, colo, lifeCycles);
     }
 
-    public String rerunInstances(String type, String entity, String start,
-                                 String end, String colo, String clusters, String sourceClusters,
-                                 List<LifeCycle> lifeCycles)
-        throws FalconCLIException, UnsupportedEncodingException {
-
-        return sendInstanceRequest(Instances.RERUN, type, entity, start, end,
-                getServletInputStream(clusters, sourceClusters, "oozie.wf.rerun.failnodes=true\n"),
null, colo,
-                lifeCycles);
-    }
-
     public String getLogsOfInstances(String type, String entity, String start,
                                      String end, String colo, String runId,
                                      List<LifeCycle> lifeCycles, String filterBy,

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/32aaa8ed/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 8bde7e3..41f1fe0 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
@@ -1300,14 +1300,14 @@ public class OozieWorkflowEngine extends AbstractWorkflowEngine {
             WorkflowJob jobInfo = client.getJobInfo(jobId);
             Properties jobprops = OozieUtils.toProperties(jobInfo.getConf());
             if (props == null || props.isEmpty()) {
-                jobprops.put(OozieClient.RERUN_FAIL_NODES, "false");
+                jobprops.put(OozieClient.RERUN_FAIL_NODES, "true");
             } else {
                 for (Entry<Object, Object> entry : props.entrySet()) {
                     jobprops.put(entry.getKey(), entry.getValue());
                 }
                 if (!jobprops.contains(OozieClient.RERUN_FAIL_NODES)
                         && !jobprops.contains(OozieClient.RERUN_SKIP_NODES)) {
-                    jobprops.put(OozieClient.RERUN_FAIL_NODES, "false");
+                    jobprops.put(OozieClient.RERUN_FAIL_NODES, "true");
                 }
             }
             jobprops.remove(OozieClient.COORDINATOR_APP_PATH);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/32aaa8ed/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java b/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
index 88aee0c..0bcb525 100644
--- a/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
+++ b/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
@@ -835,17 +835,17 @@ public class FalconCLIIT {
                         + " -end " +  SchemaHelper.getDateFormat().format(new Date())));
 
         Assert.assertEquals(-1,
-                executeWithURL("instance -continue -type process -name "
+                executeWithURL("instance -rerun -type process -name "
                         + overlay.get("processName")
                         + " -start " + START_INSTANCE));
 
         Assert.assertEquals(0,
-                executeWithURL("instance -continue -type process -name "
+                executeWithURL("instance -rerun -type process -name "
                         + overlay.get("processName")
                         + " -start " + START_INSTANCE + " -end " + START_INSTANCE));
 
         Assert.assertEquals(0,
-                executeWithURL("instance -continue -type feed -lifecycle eviction -name "
+                executeWithURL("instance -rerun -type feed -lifecycle eviction -name "
                         + overlay.get("outputFeedName")
                         + " -start "+ SchemaHelper.getDateFormat().format(new Date())
                         + " -end " + SchemaHelper.getDateFormat().format(new Date())));


Mime
View raw message