You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Vimal Sharma <vi...@hortonworks.com> on 2017/01/18 11:58:35 UTC

Review Request 55671: REST API endpoint to support adding a tag to multiple entities

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

Review request for atlas.


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


Repository: atlas


Description
-------

Currently, there is no REST endpoint to add a tag to multiple entities. Add a REST endpoint in V2 APIs to support adding a tag to multiple entities in a single call.


Diffs
-----

  webapp/src/main/java/org/apache/atlas/web/rest/EntitiesREST.java f6acd07 
  webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java 265b650 

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


Testing
-------

Tested using POSTMAN client.
Added a test in TestEntitiesREST to validate the same


Thanks,

Vimal Sharma


Re: Review Request 55671: REST API endpoint to support adding a tag to multiple entities

Posted by Vimal Sharma <vi...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55671/
-----------------------------------------------------------

(Updated Jan. 20, 2017, 4:11 p.m.)


Review request for atlas.


Changes
-------

Updated patch to fix issues raised in the reviews. Thanks Madhan and Keval for the review and suggestions


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


Repository: atlas


Description
-------

Currently, there is no REST endpoint to add a tag to multiple entities. Add a REST endpoint in V2 APIs to support adding a tag to multiple entities in a single call.


Diffs (updated)
-----

  intg/src/main/java/org/apache/atlas/model/instance/ClassificationGuidListObject.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 886a8d1 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java b9671b2 
  repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java 8307835 
  server-api/src/main/java/org/apache/atlas/services/MetadataService.java e653184 
  webapp/src/main/java/org/apache/atlas/web/rest/EntitiesREST.java f6acd07 
  webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java 265b650 

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


Testing
-------

Tested using POSTMAN client.
Added a test in TestEntitiesREST to validate the same


Thanks,

Vimal Sharma


Re: Review Request 55671: REST API endpoint to support adding a tag to multiple entities

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




webapp/src/main/java/org/apache/atlas/web/rest/EntitiesREST.java (line 203)
<https://reviews.apache.org/r/55671/#comment233694>

    In case of failure, use of "for" loop here might add tag to only some of the entities - since each call to metadataServie.addTrait() is executed in a separate transaction.
    
    A better approach would be to add addTraits() method in MetadataRepository (and GraphBackedMetadataRepository) and have a single call from the REST layer. Please review.


- Madhan Neethiraj


On Jan. 18, 2017, 11:58 a.m., Vimal Sharma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55671/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2017, 11:58 a.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-1478
>     https://issues.apache.org/jira/browse/ATLAS-1478
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Currently, there is no REST endpoint to add a tag to multiple entities. Add a REST endpoint in V2 APIs to support adding a tag to multiple entities in a single call.
> 
> 
> Diffs
> -----
> 
>   webapp/src/main/java/org/apache/atlas/web/rest/EntitiesREST.java f6acd07 
>   webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java 265b650 
> 
> Diff: https://reviews.apache.org/r/55671/diff/
> 
> 
> Testing
> -------
> 
> Tested using POSTMAN client.
> Added a test in TestEntitiesREST to validate the same
> 
> 
> Thanks,
> 
> Vimal Sharma
> 
>