Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
FALCON-2088 Entity submission fails with EntityNotRegisteredException…
… in distributed mode

… in distributed mode

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

Reviewers: "Pallavi Rao <pallavi@apache.org>"

Closes #232 from PraveenAdlakha/2088

(cherry picked from commit 9a4c18c)
Signed-off-by: bvellanki <bvellanki@hortonworks.com>
  • Loading branch information
PraveenAdlakha authored and bvellanki committed Jul 19, 2016
1 parent b1025c7 commit 3b05c17fe267e792be5c0a3eff77ba3752a73561
Showing 1 changed file with 3 additions and 15 deletions.
@@ -167,21 +167,9 @@ protected Set<String> getApplicableColos(String type, Entity entity) {

Set<String> clusters = EntityUtil.getClustersDefined(entity);
Set<String> colos = new HashSet<String>();
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);
}
if (colos.isEmpty()) {
throw new EntityNotRegisteredException(entity.getName() + " (" + type + ") not found");
for (String cluster : clusters) {
Cluster clusterEntity = EntityUtil.getEntity(EntityType.CLUSTER, cluster);
colos.add(clusterEntity.getColo());
}
return colos;
} catch (FalconException e) {

0 comments on commit 3b05c17

Please sign in to comment.