You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Wojciech Wojcik <wo...@pl.ibm.com> on 2017/02/08 10:44:09 UTC

Re: Review Request 56324: ATLAS-1527 Batch entity retrievals - DefaultMetadataService.loadEntities

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

(Updated Feb. 8, 2017, 10:44 a.m.)


Review request for atlas, David Kantor and Jeff Hagelberg.


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


Repository: atlas


Description
-------

DefaultMetadataService.loadEntities() is called at the conclusion of entity creation and update, to load the created/updated entities which are passed to the EntityChangeListener's. The entities are being loaded one at time, because MetadataRepository does not expose a method to retrieve multiple entities by GUID. MetadataRepository can be enhanced to provide a getEntityDefinitions() entrypoint, and the implementation in GraphBackedMetadataRepository can batch the vertex retrievals using GraphHelper.getVerticesForGUIDs(). This will reduce the graph calls to retrieve the vertices.


Diffs
-----

  repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1d61ea84f33e8a273229cc077cf1c205d7e29f96 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java 27bf6d7278ac22ae9d1b572141e5a19e1293c48f 
  repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java b14531f0b994674daa72773e65476151215d664b 
  repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java 43b08c45cdf7d659a6f2c404c5bc819be8886135 

Diff: https://reviews.apache.org/r/56324/diff/


Testing
-------

Ran full build, no regressions found


Thanks,

Wojciech Wojcik


Re: Review Request 56324: ATLAS-1527 Batch entity retrievals - DefaultMetadataService.loadEntities

Posted by Jeff Hagelberg <jn...@us.ibm.com>.

> On Feb. 8, 2017, 3:07 p.m., Jeff Hagelberg wrote:
> > This looks good.

If you are ready for this to be committed, please upload the patch to the JIRA and change the state of the JIRA to patch available.


- Jeff


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


On Feb. 8, 2017, 10:44 a.m., Wojciech Wojcik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56324/
> -----------------------------------------------------------
> 
> (Updated Feb. 8, 2017, 10:44 a.m.)
> 
> 
> Review request for atlas, David Kantor and Jeff Hagelberg.
> 
> 
> Bugs: ATLAS-1527
>     https://issues.apache.org/jira/browse/ATLAS-1527
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> DefaultMetadataService.loadEntities() is called at the conclusion of entity creation and update, to load the created/updated entities which are passed to the EntityChangeListener's. The entities are being loaded one at time, because MetadataRepository does not expose a method to retrieve multiple entities by GUID. MetadataRepository can be enhanced to provide a getEntityDefinitions() entrypoint, and the implementation in GraphBackedMetadataRepository can batch the vertex retrievals using GraphHelper.getVerticesForGUIDs(). This will reduce the graph calls to retrieve the vertices.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1d61ea84f33e8a273229cc077cf1c205d7e29f96 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java 27bf6d7278ac22ae9d1b572141e5a19e1293c48f 
>   repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java b14531f0b994674daa72773e65476151215d664b 
>   repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java 43b08c45cdf7d659a6f2c404c5bc819be8886135 
> 
> Diff: https://reviews.apache.org/r/56324/diff/
> 
> 
> Testing
> -------
> 
> Ran full build, no regressions found
> 
> 
> Thanks,
> 
> Wojciech Wojcik
> 
>


Re: Review Request 56324: ATLAS-1527 Batch entity retrievals - DefaultMetadataService.loadEntities

Posted by Wojciech Wojcik <wo...@pl.ibm.com>.

> On Feb. 8, 2017, 3:07 p.m., Jeff Hagelberg wrote:
> > This looks good.
> 
> Jeff Hagelberg wrote:
>     If you are ready for this to be committed, please upload the patch to the JIRA and change the state of the JIRA to patch available.

Yes this is ready for commital. Attached patch to JIRA and changed the status.


- Wojciech


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


On Feb. 8, 2017, 10:44 a.m., Wojciech Wojcik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56324/
> -----------------------------------------------------------
> 
> (Updated Feb. 8, 2017, 10:44 a.m.)
> 
> 
> Review request for atlas, David Kantor and Jeff Hagelberg.
> 
> 
> Bugs: ATLAS-1527
>     https://issues.apache.org/jira/browse/ATLAS-1527
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> DefaultMetadataService.loadEntities() is called at the conclusion of entity creation and update, to load the created/updated entities which are passed to the EntityChangeListener's. The entities are being loaded one at time, because MetadataRepository does not expose a method to retrieve multiple entities by GUID. MetadataRepository can be enhanced to provide a getEntityDefinitions() entrypoint, and the implementation in GraphBackedMetadataRepository can batch the vertex retrievals using GraphHelper.getVerticesForGUIDs(). This will reduce the graph calls to retrieve the vertices.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1d61ea84f33e8a273229cc077cf1c205d7e29f96 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java 27bf6d7278ac22ae9d1b572141e5a19e1293c48f 
>   repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java b14531f0b994674daa72773e65476151215d664b 
>   repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java 43b08c45cdf7d659a6f2c404c5bc819be8886135 
> 
> Diff: https://reviews.apache.org/r/56324/diff/
> 
> 
> Testing
> -------
> 
> Ran full build, no regressions found
> 
> 
> Thanks,
> 
> Wojciech Wojcik
> 
>


Re: Review Request 56324: ATLAS-1527 Batch entity retrievals - DefaultMetadataService.loadEntities

Posted by Jeff Hagelberg <jn...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56324/#review164690
-----------------------------------------------------------


Ship it!




This looks good.

- Jeff Hagelberg


On Feb. 8, 2017, 10:44 a.m., Wojciech Wojcik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56324/
> -----------------------------------------------------------
> 
> (Updated Feb. 8, 2017, 10:44 a.m.)
> 
> 
> Review request for atlas, David Kantor and Jeff Hagelberg.
> 
> 
> Bugs: ATLAS-1527
>     https://issues.apache.org/jira/browse/ATLAS-1527
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> DefaultMetadataService.loadEntities() is called at the conclusion of entity creation and update, to load the created/updated entities which are passed to the EntityChangeListener's. The entities are being loaded one at time, because MetadataRepository does not expose a method to retrieve multiple entities by GUID. MetadataRepository can be enhanced to provide a getEntityDefinitions() entrypoint, and the implementation in GraphBackedMetadataRepository can batch the vertex retrievals using GraphHelper.getVerticesForGUIDs(). This will reduce the graph calls to retrieve the vertices.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1d61ea84f33e8a273229cc077cf1c205d7e29f96 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java 27bf6d7278ac22ae9d1b572141e5a19e1293c48f 
>   repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java b14531f0b994674daa72773e65476151215d664b 
>   repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java 43b08c45cdf7d659a6f2c404c5bc819be8886135 
> 
> Diff: https://reviews.apache.org/r/56324/diff/
> 
> 
> Testing
> -------
> 
> Ran full build, no regressions found
> 
> 
> Thanks,
> 
> Wojciech Wojcik
> 
>