Return-Path: X-Original-To: apmail-falcon-commits-archive@minotaur.apache.org Delivered-To: apmail-falcon-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CDC618817 for ; Thu, 20 Aug 2015 14:21:54 +0000 (UTC) Received: (qmail 72382 invoked by uid 500); 20 Aug 2015 14:21:54 -0000 Delivered-To: apmail-falcon-commits-archive@falcon.apache.org Received: (qmail 72339 invoked by uid 500); 20 Aug 2015 14:21:54 -0000 Mailing-List: contact commits-help@falcon.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.apache.org Delivered-To: mailing list commits@falcon.apache.org Received: (qmail 72197 invoked by uid 99); 20 Aug 2015 14:21:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2015 14:21:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DC8A4E7DDE; Thu, 20 Aug 2015 14:21:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ajayyadava@apache.org To: commits@falcon.apache.org Date: Thu, 20 Aug 2015 14:21:57 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [5/7] falcon git commit: FALCON-1344 EntityGraph returns null in list of dependent entities. Contributed by Ajay Yadava. 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 Authored: Tue Aug 18 14:59:53 2015 +0530 Committer: Ajay Yadava 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 dependents = new HashSet(); 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> 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