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-1749 Instance status does not show instances if entity is dele…
Date Thu, 21 Apr 2016 10:09:52 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 054aa772b -> b34069b7f


FALCON-1749 Instance status does not show instances if entity is dele…

…ted from one of the colos

Author: Praveen Adlakha <adlakha.praveen@gmail.com>

Reviewers: Pallavi Rao <pallavi.rao@inmobi.com>

Closes #108 from PraveenAdlakha/1749 and squashes the following commits:

ef50c74 [Praveen Adlakha] minor fix
0cedbb8 [Praveen Adlakha] Merge branch '1749' of github.com:PraveenAdlakha/falcon into 1749
7e25db6 [Praveen Adlakha] FALCON-1749 Instance status does not show instances if entity is
deleted from one of the colos


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

Branch: refs/heads/master
Commit: b34069b7f3fe4178bf12b4483b14fffd765290ed
Parents: 054aa77
Author: Praveen Adlakha <adlakha.praveen@gmail.com>
Authored: Thu Apr 21 15:39:36 2016 +0530
Committer: Pallavi Rao <pallavi.rao@inmobi.com>
Committed: Thu Apr 21 15:39:36 2016 +0530

----------------------------------------------------------------------
 .../apache/falcon/resource/AbstractEntityManager.java    | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/b34069b7/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java b/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
index 7d5945a..c119f23 100644
--- a/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
+++ b/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
@@ -162,8 +162,15 @@ public abstract class AbstractEntityManager extends AbstractMetadataResource
{
             Set<String> clusters = EntityUtil.getClustersDefined(entity);
             Set<String> colos = new HashSet<String>();
             for (String cluster : clusters) {
-                Cluster clusterEntity = EntityUtil.getEntity(EntityType.CLUSTER, cluster);
-                colos.add(clusterEntity.getColo());
+                try{
+                    Cluster clusterEntity = EntityUtil.getEntity(EntityType.CLUSTER, cluster);
+                    colos.add(clusterEntity.getColo());
+                } catch (EntityNotRegisteredException e){
+                    LOG.warn(e.getMessage(), e);
+                }
+            }
+            if (colos.isEmpty()) {
+                throw new EntityNotRegisteredException(entity.getName()  + " (" + type +
") not found");
             }
             return colos;
         } catch (FalconException e) {


Mime
View raw message