You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by pa...@apache.org on 2016/07/14 09:41:51 UTC
falcon git commit: FALCON-1749 Instance status does not show instances if entity is dele…
Repository: falcon
Updated Branches:
refs/heads/master afb07cc2c -> 37848ed65
FALCON-1749 Instance status does not show instances if entity is dele\u2026
\u2026ted from one of the colos
Author: Praveen Adlakha <ad...@gmail.com>
Reviewers: @bvellanki, @pallavi-rao
Closes #222 from PraveenAdlakha/1749_V2 and squashes the following commits:
e476a85 [Praveen Adlakha] Pallavi's comment addressed
84e389f [Praveen Adlakha] Comments added for future reference
dbc7e1c [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/37848ed6
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/37848ed6
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/37848ed6
Branch: refs/heads/master
Commit: 37848ed653dbebcee5cbaec546ccc7a9d1fdb4fe
Parents: afb07cc
Author: Praveen Adlakha <ad...@gmail.com>
Authored: Thu Jul 14 15:11:44 2016 +0530
Committer: Pallavi Rao <pa...@inmobi.com>
Committed: Thu Jul 14 15:11:44 2016 +0530
----------------------------------------------------------------------
.../apache/falcon/resource/AbstractEntityManager.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/falcon/blob/37848ed6/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 9169c18..8856d80 100644
--- a/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
+++ b/prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java
@@ -169,13 +169,18 @@ public abstract class AbstractEntityManager extends AbstractMetadataResource {
Set<String> clusters = EntityUtil.getClustersDefined(entity);
Set<String> colos = new HashSet<String>();
- for (String cluster : clusters) {
- try{
+ try{
+ // Fix for Falcon-1749
+ EntityType entitytype = EntityType.getEnum(type);
+ if (entitytype == EntityType.PROCESS || entitytype == EntityType.FEED){
+ EntityUtil.getEntity(entitytype, entity.getName());
+ }
+ for (String cluster : clusters) {
Cluster clusterEntity = EntityUtil.getEntity(EntityType.CLUSTER, cluster);
colos.add(clusterEntity.getColo());
- } catch (EntityNotRegisteredException e){
- LOG.warn(e.getMessage(), e);
}
+ }catch (EntityNotRegisteredException e){
+ LOG.warn(e.getMessage(), e);
}
if (colos.isEmpty()) {
throw new EntityNotRegisteredException(entity.getName() + " (" + type + ") not found");