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 2018/05/09 07:50:29 UTC

Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

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

Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.


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


Repository: atlas


Description
-------

Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.


Diffs
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
  intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
  intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
  intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 


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


Testing
-------

Added Unit Test - AtlasComplexAttributesTest to test all complex attributes

PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console


Thanks,

Sarath Subramanian


Re: Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

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




repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Lines 1575 (patched)
<https://reviews.apache.org/r/67028/#comment284797>

    This comment can be removed.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
Line 244 (original), 249 (patched)
<https://reviews.apache.org/r/67028/#comment284798>

    With this change, there won't a vertex property for map attributes (that refer to other entities). Perhaps GraphHelper.getMapElementsUsingRelationship(vertex, attributeInfo) should be called from here?



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
Line 726 (original), 724 (patched)
<https://reviews.apache.org/r/67028/#comment284799>

    getCollectionElementsUsingRelationship => getMapElementsUsingRelationship?



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
Line 845 (original), 824 (patched)
<https://reviews.apache.org/r/67028/#comment284800>

    getCollectionElementsUsingRelationship => getMapElementsUsingRelationship


- Madhan Neethiraj


On May 9, 2018, 10:26 p.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67028/
> -----------------------------------------------------------
> 
> (Updated May 9, 2018, 10:26 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.
> 
> 
> Bugs: ATLAS-2662
>     https://issues.apache.org/jira/browse/ATLAS-2662
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/67028/diff/3/
> 
> 
> Testing
> -------
> 
> Added Unit Test - AtlasComplexAttributesTest to test all complex attributes
> 
> PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

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


Ship it!




Ship It!

- Madhan Neethiraj


On May 10, 2018, 12:45 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67028/
> -----------------------------------------------------------
> 
> (Updated May 10, 2018, 12:45 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.
> 
> 
> Bugs: ATLAS-2662
>     https://issues.apache.org/jira/browse/ATLAS-2662
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/67028/diff/5/
> 
> 
> Testing
> -------
> 
> Added Unit Test - AtlasComplexAttributesTest to test all complex attributes
> 
> PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

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

(Updated May 9, 2018, 5:45 p.m.)


Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.


Changes
-------

addressed review comments.


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


Repository: atlas


Description
-------

Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.


Diffs (updated)
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
  intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
  intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
  intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 


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

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


Testing
-------

Added Unit Test - AtlasComplexAttributesTest to test all complex attributes

PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console


Thanks,

Sarath Subramanian


Re: Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

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




repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Line 1584 (original), 1613 (patched)
<https://reviews.apache.org/r/67028/#comment284801>

    Consider marking this as 'privte', to avoid possible confusion with getMapElementsProperty() above.
    
    Or rename:
     - getMapElements() to getPrimitiveMap()
     - getMapElementsUsingRelationship() to Map<String, AtlasEdge> getReferenceMap()



repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Lines 1645 (patched)
<https://reviews.apache.org/r/67028/#comment284802>

    Call to hasIndexes(), which iterates over all edges, can be avoided by having sortRelationshipElements() treat absence of edge property ATTRIBUTE_INDEX_PROPERTY_KEY as value '0'.


- Madhan Neethiraj


On May 10, 2018, 12:34 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67028/
> -----------------------------------------------------------
> 
> (Updated May 10, 2018, 12:34 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.
> 
> 
> Bugs: ATLAS-2662
>     https://issues.apache.org/jira/browse/ATLAS-2662
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/67028/diff/4/
> 
> 
> Testing
> -------
> 
> Added Unit Test - AtlasComplexAttributesTest to test all complex attributes
> 
> PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

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

(Updated May 9, 2018, 5:34 p.m.)


Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.


Changes
-------

addressed review comments.


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


Repository: atlas


Description
-------

Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.


Diffs (updated)
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
  intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
  intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
  intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 


Diff: https://reviews.apache.org/r/67028/diff/4/

Changes: https://reviews.apache.org/r/67028/diff/3-4/


Testing
-------

Added Unit Test - AtlasComplexAttributesTest to test all complex attributes

PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console


Thanks,

Sarath Subramanian


Re: Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

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

(Updated May 9, 2018, 3:26 p.m.)


Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.


Changes
-------

addressed review comments.


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


Repository: atlas


Description
-------

Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.


Diffs (updated)
-----

  common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
  intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
  intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
  intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
  intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
  repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 


Diff: https://reviews.apache.org/r/67028/diff/2/

Changes: https://reviews.apache.org/r/67028/diff/1-2/


Testing
-------

Added Unit Test - AtlasComplexAttributesTest to test all complex attributes

PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console


Thanks,

Sarath Subramanian


Re: Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

Posted by Sarath Subramanian <sa...@apache.org>.

> On May 9, 2018, 10:46 a.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
> > Lines 1623 (patched)
> > <https://reviews.apache.org/r/67028/diff/1/?file=2018429#file2018429line1626>
> >
> >     Does JanusGraph support storing map value directly in vertex property? If yes, perhaps we should replace current handling of map - by storing entire map in a single property.

Yes JanusGraph supports it, I'll take this up in a new JIRA.


> On May 9, 2018, 10:46 a.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java
> > Line 646 (original), 647 (patched)
> > <https://reviews.apache.org/r/67028/diff/1/?file=2018433#file2018433line649>
> >
> >     Looks like #645 - #658 are needed only if value type is object-id. For other types  relationshipEdgeLable/EdgeDirection won't be appicable.
> >     
> >     Primitive value-types should already be handled by #635.
> >     Struct type should probably be handled here.
> >     
> >     Similar for mapVertexToArray().
> >     
> >     Please review and update.

refactored this method.


- Sarath


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


On May 9, 2018, 3:26 p.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67028/
> -----------------------------------------------------------
> 
> (Updated May 9, 2018, 3:26 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.
> 
> 
> Bugs: ATLAS-2662
>     https://issues.apache.org/jira/browse/ATLAS-2662
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/67028/diff/2/
> 
> 
> Testing
> -------
> 
> Added Unit Test - AtlasComplexAttributesTest to test all complex attributes
> 
> PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 67028: ATLAS-2662: Remove complex array and map attribute's edge information from entity vertex

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




repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Line 1563 (original), 1568 (patched)
<https://reviews.apache.org/r/67028/#comment284764>

    If this case is still relevant? If not, consider removing it.



repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Line 1573 (original), 1578 (patched)
<https://reviews.apache.org/r/67028/#comment284763>

    If this case is still relevant? If not, consider removing it.



repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Line 1584 (original), 1589 (patched)
<https://reviews.apache.org/r/67028/#comment284762>

    If this case is still relevant? If not, consider removing it.



repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Lines 1620 (patched)
<https://reviews.apache.org/r/67028/#comment284749>

    propertyName not encoded - similar to line #1602 above? Please review and update #1624 as well.



repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
Lines 1623 (patched)
<https://reviews.apache.org/r/67028/#comment284750>

    Does JanusGraph support storing map value directly in vertex property? If yes, perhaps we should replace current handling of map - by storing entire map in a single property.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java
Line 617 (original), 620 (patched)
<https://reviews.apache.org/r/67028/#comment284760>

    Since 'attribute' is include in the argument, there is no need to send attrType. Same applies for line #623 below as well.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java
Line 646 (original), 647 (patched)
<https://reviews.apache.org/r/67028/#comment284761>

    Looks like #645 - #658 are needed only if value type is object-id. For other types  relationshipEdgeLable/EdgeDirection won't be appicable.
    
    Primitive value-types should already be handled by #635.
    Struct type should probably be handled here.
    
    Similar for mapVertexToArray().
    
    Please review and update.


- Madhan Neethiraj


On May 9, 2018, 7:50 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67028/
> -----------------------------------------------------------
> 
> (Updated May 9, 2018, 7:50 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.
> 
> 
> Bugs: ATLAS-2662
>     https://issues.apache.org/jira/browse/ATLAS-2662
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently entities with complex types like: array<AtlasEntity>, array<AtlasStruct>, map<String, AtlasStruct>, map<String, AtlasEntity> store list of edge ids in the entity vertex. This JIRA removes all edge id information from vertex and uses edge label and properties to retrieve such attributes.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/atlas/repository/Constants.java 16a3aaa15 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 5f89ffb59 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java ab5f145af 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 2f870dcd0 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java 836710c99 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 7540b4c71 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bd0dc0b44 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java f28d771db 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 172854925 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 0d654712e 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java PRE-CREATION 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1Test.java 0913e6ff6 
>   repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/67028/diff/1/
> 
> 
> Testing
> -------
> 
> Added Unit Test - AtlasComplexAttributesTest to test all complex attributes
> 
> PreCommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/361/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>