falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [1/3] git commit: FALCON-695 Lineage: "stored-in" edge is added between feed entity and target cluster. Contributed by Sowmya Ramesh
Date Tue, 09 Sep 2014 18:50:35 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 5766b74ae -> 2e3eebdff


FALCON-695 Lineage: "stored-in" edge is added between feed entity and target cluster. Contributed
by Sowmya Ramesh


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

Branch: refs/heads/master
Commit: e59bef7626284efec5d0acdb43edfc5806a7d6a4
Parents: 5766b74
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Tue Sep 9 11:47:49 2014 -0700
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Tue Sep 9 11:47:49 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                        |  3 +++
 .../metadata/EntityRelationshipGraphBuilder.java   | 17 ++++++++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/e59bef76/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4a3bbc4..757dd99 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -77,6 +77,9 @@ Trunk (Unreleased)
   OPTIMIZATIONS
 
   BUG FIXES
+   FALCON-695 Lineage: "stored-in" edge is added between feed entity and
+   target cluster (Sowmya Ramesh via Venkatesh Seetharam)
+
    FALCON-669 Missing optional workflow execution listeners configuration
    results in NPE (Raghav Kumar Gautam via Venkatesh Seetharam)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/e59bef76/common/src/main/java/org/apache/falcon/metadata/EntityRelationshipGraphBuilder.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/metadata/EntityRelationshipGraphBuilder.java
b/common/src/main/java/org/apache/falcon/metadata/EntityRelationshipGraphBuilder.java
index 1b7a068..c22bcdb 100644
--- a/common/src/main/java/org/apache/falcon/metadata/EntityRelationshipGraphBuilder.java
+++ b/common/src/main/java/org/apache/falcon/metadata/EntityRelationshipGraphBuilder.java
@@ -22,6 +22,7 @@ import com.tinkerpop.blueprints.Graph;
 import com.tinkerpop.blueprints.Vertex;
 import org.apache.falcon.entity.ProcessHelper;
 import org.apache.falcon.entity.v0.cluster.Cluster;
+import org.apache.falcon.entity.v0.feed.ClusterType;
 import org.apache.falcon.entity.v0.feed.Feed;
 import org.apache.falcon.entity.v0.process.Input;
 import org.apache.falcon.entity.v0.process.Inputs;
@@ -66,7 +67,9 @@ public class EntityRelationshipGraphBuilder extends RelationshipGraphBuilder
{
         addGroups(feed.getGroups(), feedVertex);
 
         for (org.apache.falcon.entity.v0.feed.Cluster feedCluster : feed.getClusters().getClusters())
{
-            addRelationToCluster(feedVertex, feedCluster.getName(), RelationshipLabel.FEED_CLUSTER_EDGE);
+            if (ClusterType.TARGET != feedCluster.getType()) {
+                addRelationToCluster(feedVertex, feedCluster.getName(), RelationshipLabel.FEED_CLUSTER_EDGE);
+            }
         }
     }
 
@@ -264,14 +267,18 @@ public class EntityRelationshipGraphBuilder extends RelationshipGraphBuilder
{
 
         // remove edges to old clusters
         for (org.apache.falcon.entity.v0.feed.Cluster oldCuster : oldClusters) {
-            removeEdge(feedEntityVertex, oldCuster.getName(),
-                    RelationshipLabel.FEED_CLUSTER_EDGE.getName());
+            if (ClusterType.TARGET != oldCuster.getType()) {
+                removeEdge(feedEntityVertex, oldCuster.getName(),
+                        RelationshipLabel.FEED_CLUSTER_EDGE.getName());
+            }
         }
 
         // add edges to new clusters
         for (org.apache.falcon.entity.v0.feed.Cluster newCluster : newClusters) {
-            addRelationToCluster(feedEntityVertex, newCluster.getName(),
-                    RelationshipLabel.FEED_CLUSTER_EDGE);
+            if (ClusterType.TARGET != newCluster.getType()) {
+                addRelationToCluster(feedEntityVertex, newCluster.getName(),
+                        RelationshipLabel.FEED_CLUSTER_EDGE);
+            }
         }
     }
 


Mime
View raw message