falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pall...@apache.org
Subject falcon git commit: FALCON-1401 MetadataMappingService fails to add an edge for a process instance
Date Tue, 22 Sep 2015 10:13:13 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 5e4b06b7c -> 55bcc14af


FALCON-1401 MetadataMappingService fails to add an edge for a process instance


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

Branch: refs/heads/master
Commit: 55bcc14afe9448932160568dc90f72e7ee53b363
Parents: 5e4b06b
Author: Pallavi Rao <pallavi.rao@inmobi.com>
Authored: Tue Sep 22 15:42:47 2015 +0530
Committer: Pallavi Rao <pallavi.rao@inmobi.com>
Committed: Tue Sep 22 15:42:47 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                               |  3 +++
 .../falcon/metadata/InstanceRelationshipGraphBuilder.java |  5 +++--
 .../org/apache/falcon/oozie/OozieCoordinatorBuilder.java  |  2 --
 .../java/org/apache/falcon/oozie/OozieEntityBuilder.java  |  3 +++
 .../oozie/process/ProcessExecutionCoordinatorBuilder.java | 10 +++++-----
 .../oozie/process/OozieProcessWorkflowBuilderTest.java    |  2 +-
 6 files changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/55bcc14a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 33349b4..445b56f 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,7 @@ Trunk (Unreleased)
   FALCON-1349 Upgrade falcon POM for 0.7 release(Ajay Yadava)
 
   INCOMPATIBLE CHANGES
+    FALCON-1401 MetadataMappingService fails to add an edge for a process instance(Pallavi
Rao) 
 
   NEW FEATURES
     FALCON-1027 Falcon proxy user support(Sowmya Ramesh)
@@ -30,6 +31,8 @@ Trunk (Unreleased)
     FALCON-1403 Revisit IT cleanup and teardown(Narayan Periwal via Pallavi Rao)
 
   BUG FIXES
+    FALCON-1401 MetadataMappingService fails to add an edge for a process instance(Pallavi
Rao) 
+
     FALCON-1465 Cluster submission fails with java.lang.IllegalArgumentException in distributed
mode(Ajay Yadava via Sowmya Ramesh)
 
     FALCON-1331 Update Failed for an entity and further updates are not possible as lock
is not released(Pavan Kumar Kolamuri via Ajay Yadava)

http://git-wip-us.apache.org/repos/asf/falcon/blob/55bcc14a/common/src/main/java/org/apache/falcon/metadata/InstanceRelationshipGraphBuilder.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/metadata/InstanceRelationshipGraphBuilder.java
b/common/src/main/java/org/apache/falcon/metadata/InstanceRelationshipGraphBuilder.java
index 17bf813..016c622 100644
--- a/common/src/main/java/org/apache/falcon/metadata/InstanceRelationshipGraphBuilder.java
+++ b/common/src/main/java/org/apache/falcon/metadata/InstanceRelationshipGraphBuilder.java
@@ -51,6 +51,7 @@ public class InstanceRelationshipGraphBuilder extends RelationshipGraphBuilder
{
     private static final Logger LOG = LoggerFactory.getLogger(InstanceRelationshipGraphBuilder.class);
 
     private static final String FEED_INSTANCE_FORMAT = "yyyyMMddHHmm"; // computed
+    private static final String NONE = "NONE";
     private static final String IGNORE = "IGNORE";
 
     // process workflow properties from message
@@ -138,7 +139,7 @@ public class InstanceRelationshipGraphBuilder extends RelationshipGraphBuilder
{
     public void addOutputFeedInstances(WorkflowExecutionContext context,
                                        Vertex processInstance) throws FalconException {
         String outputFeedNamesArg = context.getOutputFeedNames();
-        if ("NONE".equals(outputFeedNamesArg)) {
+        if (NONE.equals(outputFeedNamesArg) || IGNORE.equals(outputFeedNamesArg)) {
             return; // there are no output feeds for this process
         }
 
@@ -156,7 +157,7 @@ public class InstanceRelationshipGraphBuilder extends RelationshipGraphBuilder
{
     public void addInputFeedInstances(WorkflowExecutionContext context,
                                       Vertex processInstance) throws FalconException {
         String inputFeedNamesArg = context.getInputFeedNames();
-        if ("NONE".equals(inputFeedNamesArg)) {
+        if (NONE.equals(inputFeedNamesArg) || IGNORE.equals(inputFeedNamesArg)) {
             return; // there are no input feeds for this process
         }
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/55bcc14a/oozie/src/main/java/org/apache/falcon/oozie/OozieCoordinatorBuilder.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/falcon/oozie/OozieCoordinatorBuilder.java b/oozie/src/main/java/org/apache/falcon/oozie/OozieCoordinatorBuilder.java
index 85f5330..a04ae95 100644
--- a/oozie/src/main/java/org/apache/falcon/oozie/OozieCoordinatorBuilder.java
+++ b/oozie/src/main/java/org/apache/falcon/oozie/OozieCoordinatorBuilder.java
@@ -49,8 +49,6 @@ public abstract class OozieCoordinatorBuilder<T extends Entity> extends
OozieEnt
     protected static final String NOMINAL_TIME_EL = "${coord:formatTime(coord:nominalTime(),
'yyyy-MM-dd-HH-mm')}";
     protected static final String ACTUAL_TIME_EL = "${coord:formatTime(coord:actualTime(),
'yyyy-MM-dd-HH-mm')}";
 
-
-    protected static final String IGNORE = "IGNORE";
     private static final Object USER_JMS_NOTIFICATION_ENABLED = "userJMSNotificationEnabled";
     protected final LifeCycle lifecycle;
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/55bcc14a/oozie/src/main/java/org/apache/falcon/oozie/OozieEntityBuilder.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/falcon/oozie/OozieEntityBuilder.java b/oozie/src/main/java/org/apache/falcon/oozie/OozieEntityBuilder.java
index 491cd81..e0af30d 100644
--- a/oozie/src/main/java/org/apache/falcon/oozie/OozieEntityBuilder.java
+++ b/oozie/src/main/java/org/apache/falcon/oozie/OozieEntityBuilder.java
@@ -73,7 +73,10 @@ public abstract class OozieEntityBuilder<T extends Entity> {
 
     public static final String ENTITY_PATH = "ENTITY_PATH";
     public static final String ENTITY_NAME = "ENTITY_NAME";
+    // Used when the parameter exists but is not applicable for a particular action/scenario
     protected static final String IGNORE = "IGNORE";
+    // Used when the parameter is not available
+    protected static final String NONE = "NONE";
 
     private static final FalconPathFilter FALCON_JAR_FILTER = new FalconPathFilter() {
         @Override

http://git-wip-us.apache.org/repos/asf/falcon/blob/55bcc14a/oozie/src/main/java/org/apache/falcon/oozie/process/ProcessExecutionCoordinatorBuilder.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/falcon/oozie/process/ProcessExecutionCoordinatorBuilder.java
b/oozie/src/main/java/org/apache/falcon/oozie/process/ProcessExecutionCoordinatorBuilder.java
index 7154e40..f5c9948 100644
--- a/oozie/src/main/java/org/apache/falcon/oozie/process/ProcessExecutionCoordinatorBuilder.java
+++ b/oozie/src/main/java/org/apache/falcon/oozie/process/ProcessExecutionCoordinatorBuilder.java
@@ -144,9 +144,9 @@ public class ProcessExecutionCoordinatorBuilder extends OozieCoordinatorBuilder<
 
     private void initializeInputPaths(Cluster cluster, COORDINATORAPP coord, Properties props)
throws FalconException {
         if (entity.getInputs() == null) {
-            props.put(WorkflowExecutionArgs.INPUT_FEED_NAMES.getName(), "NONE");
-            props.put(WorkflowExecutionArgs.INPUT_FEED_PATHS.getName(), IGNORE);
-            props.put(WorkflowExecutionArgs.INPUT_NAMES.getName(), IGNORE);
+            props.put(WorkflowExecutionArgs.INPUT_FEED_NAMES.getName(), NONE);
+            props.put(WorkflowExecutionArgs.INPUT_FEED_PATHS.getName(), NONE);
+            props.put(WorkflowExecutionArgs.INPUT_NAMES.getName(), NONE);
             return;
         }
 
@@ -252,8 +252,8 @@ public class ProcessExecutionCoordinatorBuilder extends OozieCoordinatorBuilder<
 
     private void initializeOutputPaths(Cluster cluster, COORDINATORAPP coord, Properties
props) throws FalconException {
         if (entity.getOutputs() == null) {
-            props.put(WorkflowExecutionArgs.OUTPUT_FEED_NAMES.getName(), IGNORE);
-            props.put(WorkflowExecutionArgs.OUTPUT_FEED_PATHS.getName(), IGNORE);
+            props.put(WorkflowExecutionArgs.OUTPUT_FEED_NAMES.getName(), NONE);
+            props.put(WorkflowExecutionArgs.OUTPUT_FEED_PATHS.getName(), NONE);
             return;
         }
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/55bcc14a/oozie/src/test/java/org/apache/falcon/oozie/process/OozieProcessWorkflowBuilderTest.java
----------------------------------------------------------------------
diff --git a/oozie/src/test/java/org/apache/falcon/oozie/process/OozieProcessWorkflowBuilderTest.java
b/oozie/src/test/java/org/apache/falcon/oozie/process/OozieProcessWorkflowBuilderTest.java
index e8d6cdd..9f492d7 100644
--- a/oozie/src/test/java/org/apache/falcon/oozie/process/OozieProcessWorkflowBuilderTest.java
+++ b/oozie/src/test/java/org/apache/falcon/oozie/process/OozieProcessWorkflowBuilderTest.java
@@ -734,7 +734,7 @@ public class OozieProcessWorkflowBuilderTest extends AbstractTestBase
{
         verifyBrokerProperties(cluster, wfProps);
 
         Assert.assertEquals(props.get(WorkflowExecutionArgs.INPUT_FEED_NAMES.getName()),
"clicks");
-        Assert.assertEquals(props.get(WorkflowExecutionArgs.OUTPUT_FEED_NAMES.getName()),
"IGNORE");
+        Assert.assertEquals(props.get(WorkflowExecutionArgs.OUTPUT_FEED_NAMES.getName()),
"NONE");
     }
 
     @Test


Mime
View raw message