You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by GitBox <gi...@apache.org> on 2019/03/12 05:42:38 UTC

[GitHub] [atlas] mneethiraj commented on a change in pull request #28: ATLAS-3069: Avoid repeated printing of missing relationship def warning messages

mneethiraj commented on a change in pull request #28: ATLAS-3069: Avoid repeated printing of missing relationship def warning messages
URL: https://github.com/apache/atlas/pull/28#discussion_r264528126
 
 

 ##########
 File path: intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
 ##########
 @@ -182,8 +182,11 @@ void resolveReferencesPhase3(AtlasTypeRegistry typeRegistry) throws AtlasBaseExc
 
             // validate if RelationshipDefs is defined for all entityDefs
             if (attributeEntityType != null && !hasRelationshipAttribute(attributeName)) {
-                LOG.warn("No RelationshipDef defined between {} and {} on attribute: {}.{}", getTypeName(),
-                         attributeEntityType.getTypeName(), getTypeName(), attributeName);
+                if(!typeRegistry.containsMissingRelationshipDefEntry(getTypeName(), attributeEntityType.getTypeName(), attributeName)) {
 
 Review comment:
   consider replacing methods, containsMissingRelationshipDefEntry() and updateMissingRelationshipDefs(), with a single method like:
   
   class AtlasTypeRegistry {
     void reportMissingRelationshipDef(String type1Name, String type2Name, String attrName) {
       if (!already-reported (type1Name,type2Name, attrName)) {
         LOG.warn("No RelationshipDef defined between {} and {} on attribute: {}.{}", type1Name, type2Name, attrName);
   
         add to already-reported list (type1Name, type2Name, attrName)
       }
     }
   }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services