> On Aug. 24, 2017, 11:58 p.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java
> > Lines 307 (patched)
> > <https://reviews.apache.org/r/61247/diff/4/?file=1802370#file1802370line307>
> >
> >     It looks like lines between #307 and #329 can be replaced with the 
> > following. This would be easier to read and perhaps a little more 
> > efficient. Please review.
> >     
> >     
> >     for (AtlasAttribute attribute : entityType.getAllAttributes().values()) 
> > {
> >         AtlasType attrType = attribute.getAttributeType();
> >         String    attrName = attribute.getName();
> >     
> >         if (entity.hasRelationshipAttribute(attrName)) {
> >             visitAttribute(attrType, 
> > entity.getRelationshipAttribute(attrName));
> >         } else if (entity.hasAttribute(attrName)) {
> >             visitAttribute(attrType, entity.getAttribute(attrName));
> >         }
> >     }
> 
> Sarath Subramanian wrote:
>     entityType.getAllAttributes() doesn't include relationship attributes 
> (allAttributes is a member of AtlasStructType), also same attribute (e.g. 
> columns) might be in both relationshipAttributes and attributes - In this 
> case relationshipAttribute value takes precendence.

ok. Got it. I missed that one earlier.


- Madhan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61247/#review183805
-----------------------------------------------------------


On Aug. 23, 2017, 5:27 p.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61247/
> -----------------------------------------------------------
> 
> (Updated Aug. 23, 2017, 5:27 p.m.)
> 
> 
> Review request for atlas, David Radley and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1984
>     https://issues.apache.org/jira/browse/ATLAS-1984
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> AtlasObjectId is used to refer to entity attributes referring to another 
> entity.
> hive_table.columns => List<AtlasObjectId>
> hive_table.db => AtlasObjectId
> Change this to use AtlasRelatedObjectId with the following structure:
> class AtlasRelatedObjectId
> { String relationshipGuid; String displayText; AtlasStruct 
> relationshipAttributes; }
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationship.java 
> 41883713 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasStruct.java 
> 80f3a664 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 4304e745 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java 427439ca 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java
>  0210a118 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
>  b8fd70e5 
> 
> 
> Diff: https://reviews.apache.org/r/61247/diff/4/
> 
> 
> Testing
> -------
> 
> Tested using POSTMAN REST client
> 
> mvn clean package - In Progress
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>

Reply via email to