You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Sarath Subramanian <sa...@apache.org> on 2017/07/27 19:49:40 UTC

Review Request 61191: [ATLAS-1999]: Use AtlasRelatedObjectId to display relationshipAttribute values during entity retrieval

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

Review request for atlas, David Radley and Madhan Neethiraj.


Bugs: ATLAS-1999
    https://issues.apache.org/jira/browse/ATLAS-1999


Repository: atlas


Description
-------

* Currently relationship attribute values during entity retrieval is using AtlasObjectId format. Change this to use AtlasRelatedObjectId to contain additional information for use during search and UI
* validate and normalize relationship attribute values during entity creation


Diffs
-----

  intg/src/main/java/org/apache/atlas/model/instance/AtlasRelatedObjectId.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java f89c5568 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java 49e08a07 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 31fc8377 


Diff: https://reviews.apache.org/r/61191/diff/1/


Testing
-------

* tested using POSTMAN rest client - valid relationship attribute values in AtlasRelatedObjectId format is retrieved
* mvn clean package - test in progress


Thanks,

Sarath Subramanian


Re: Review Request 61191: [ATLAS-1999]: Use AtlasRelatedObjectId to display relationshipAttribute values during entity retrieval

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61191/#review181861
-----------------------------------------------------------


Fix it, then Ship it!





intg/src/main/java/org/apache/atlas/model/instance/AtlasRelatedObjectId.java
Lines 55 (patched)
<https://reviews.apache.org/r/61191/#comment257639>

    Constructors at line #55 and #69 shouldn't be needed. Consider removing them.



intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
Line 269 (original), 270 (patched)
<https://reviews.apache.org/r/61191/#comment258244>

    I think it will be intutive to replace:
      return isValidAttributeValue(obj)
    
    with the following:
      return super.isValidValue(obj) && validateRelationshipAttributes(obj)



intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
Lines 496 (patched)
<https://reviews.apache.org/r/61191/#comment258245>

    Consider renaming this method as "validateRelationshipAttributes()"



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java
Lines 718 (patched)
<https://reviews.apache.org/r/61191/#comment258239>

    Consider using AtlasRelatedObjectId constructor which takes relationship guid and attributes as well.


- Madhan Neethiraj


On July 27, 2017, 7:49 p.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61191/
> -----------------------------------------------------------
> 
> (Updated July 27, 2017, 7:49 p.m.)
> 
> 
> Review request for atlas, David Radley and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1999
>     https://issues.apache.org/jira/browse/ATLAS-1999
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> * Currently relationship attributes uses AtlasObjectId format during entity retrieval. Change this to use AtlasRelatedObjectId to contain additional information for use in search and UI
> * validate and normalize relationship attribute values supplied during entity creation
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasRelatedObjectId.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java f89c5568 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java c47a89e6 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java 49e08a07 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 31fc8377 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1Test.java 263ad5be 
> 
> 
> Diff: https://reviews.apache.org/r/61191/diff/4/
> 
> 
> Testing
> -------
> 
> * tested using POSTMAN rest client - valid relationship attribute values in AtlasRelatedObjectId format is retrieved
> * mvn clean package - succeeded
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 61191: [ATLAS-1999]: Use AtlasRelatedObjectId to display relationshipAttribute values during entity retrieval

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61191/
-----------------------------------------------------------

(Updated Aug. 7, 2017, 11:15 p.m.)


Review request for atlas, David Radley and Madhan Neethiraj.


Bugs: ATLAS-1999
    https://issues.apache.org/jira/browse/ATLAS-1999


Repository: atlas


Description
-------

* Currently relationship attributes uses AtlasObjectId format during entity retrieval. Change this to use AtlasRelatedObjectId to contain additional information for use in search and UI
* validate and normalize relationship attribute values supplied during entity creation


Diffs (updated)
-----

  intg/src/main/java/org/apache/atlas/model/instance/AtlasRelatedObjectId.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java f89c5568 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java c47a89e6 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java 49e08a07 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 31fc8377 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1Test.java 77a591a9 


Diff: https://reviews.apache.org/r/61191/diff/5/

Changes: https://reviews.apache.org/r/61191/diff/4-5/


Testing
-------

* tested using POSTMAN rest client - valid relationship attribute values in AtlasRelatedObjectId format is retrieved
* mvn clean package - succeeded


Thanks,

Sarath Subramanian