atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Radley <david_rad...@uk.ibm.com>
Subject Re: Review Request 61247: [ATLAS-1984]: Use AtlasRelatedObjectId to refer to relationship attributes during entity create/update
Date Mon, 07 Aug 2017 15:10:51 GMT

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




intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
Lines 334 (patched)
<https://reviews.apache.org/r/61247/#comment258173>

    Call null be a valid value for a required attribute.
    
    I think there is a differene between not specifying an attribute (i.e.e the key is not
there ) and specifying it with null as a value.



intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
Lines 319 (patched)
<https://reviews.apache.org/r/61247/#comment258174>

    I would have thought that  map.get("relationshipAttributes") would either be null or a
Map. 
    
    If relationshipAttributes is not a map - we should issue an error.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
Line 380 (original), 395 (patched)
<https://reviews.apache.org/r/61247/#comment258176>

    I am not sure what this is doing - it looks like you are adding relationship attribute
for legacy relationships and duplicating them in the inverse edge. Do we need to support relaitonship
attributes for legacy relationships? It would be  good incentive fror peopel to move to the
non legacy relationships.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
Lines 1437 (patched)
<https://reviews.apache.org/r/61247/#comment258175>

    I suggest this be static and junitted.
    
    This method seems to be removing entity attributes when there was a relationship attributes.
This appears to be part of the legacy support; if so shouldn't we be only doing this checking
for legacy cases abnd issuing errors otherwise.


- David Radley


On July 31, 2017, 3:36 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61247/
> -----------------------------------------------------------
> 
> (Updated July 31, 2017, 3:36 a.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 277d0fa2 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java 3f395419 
>   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/2/
> 
> 
> Testing
> -------
> 
> Tested using POSTMAN REST client
> 
> mvn clean package - In Progress
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message