falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajayyad...@apache.org
Subject [5/7] falcon git commit: FALCON-1344 EntityGraph returns null in list of dependent entities. Contributed by Ajay Yadava.
Date Thu, 20 Aug 2015 14:21:57 GMT
FALCON-1344 EntityGraph returns null in list of dependent entities. Contributed by Ajay Yadava.


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

Branch: refs/heads/0.7
Commit: 81380f8427cda0df3e9cc30f9cea258931f3d938
Parents: 3201e8d
Author: Ajay Yadava <ajaynsit@gmail.com>
Authored: Tue Aug 18 14:59:53 2015 +0530
Committer: Ajay Yadava <ajaynsit@gmail.com>
Committed: Thu Aug 20 19:49:01 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 .../java/org/apache/falcon/entity/v0/EntityGraph.java   | 12 ++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/81380f84/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 554cfea..23d7cf0 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -89,6 +89,8 @@ Trunk (Unreleased)
     (Suhas Vasu)
 
   BUG FIXES
+    FALCON-1344 EntityGraph returns null in list of dependent entities(Ajay Yadava)
+    
     FALCON-1330 When multiple cluster definitions exist for the same colo, triage produces
unexpected results(Ajay Yadava)
 
     FALCON-1399 Property for default number of results is not loaded dynamically(Ajay Yadava)

http://git-wip-us.apache.org/repos/asf/falcon/blob/81380f84/common/src/main/java/org/apache/falcon/entity/v0/EntityGraph.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/entity/v0/EntityGraph.java b/common/src/main/java/org/apache/falcon/entity/v0/EntityGraph.java
index 444e28d..bd4c6cf 100644
--- a/common/src/main/java/org/apache/falcon/entity/v0/EntityGraph.java
+++ b/common/src/main/java/org/apache/falcon/entity/v0/EntityGraph.java
@@ -60,8 +60,11 @@ public final class EntityGraph implements ConfigurationChangeListener {
             Set<Entity> dependents = new HashSet<Entity>();
             for (Node node : graph.get(entityNode)) {
                 Entity dependentEntity = store.get(node.type, node.name);
-                assert dependentEntity != null : "Unable to find " + node;
-                dependents.add(dependentEntity);
+                if (dependentEntity != null) {
+                    dependents.add(dependentEntity);
+                } else {
+                    LOG.error("Dependent entity {} was not found in configuration store.",
node);
+                }
             }
             return dependents;
         } else {
@@ -84,16 +87,17 @@ public final class EntityGraph implements ConfigurationChangeListener
{
         if (nodeEdges == null) {
             return;
         }
-        LOG.trace("Adding edges for {}: {}", entity.getName(), nodeEdges);
+        LOG.debug("Adding edges for {}: {}", entity.getName(), nodeEdges);
 
         for (Map.Entry<Node, Set<Node>> entry : nodeEdges.entrySet()) {
+            LOG.debug("Adding edges : {} for {}", entry.getValue(), entry.getKey());
             if (graph.containsKey(entry.getKey())) {
                 graph.get(entry.getKey()).addAll(entry.getValue());
             } else {
                 graph.put(entry.getKey(), entry.getValue());
             }
         }
-        LOG.trace("Merged edges to graph {}", entity.getName());
+        LOG.debug("Merged edges to graph {}", entity.getName());
     }
 
     @Override


Mime
View raw message