You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Shwetha GS <ss...@hortonworks.com> on 2015/08/06 13:59:39 UTC

Review Request 37181: ATLAS-59 De-duping of entities

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

Review request for atlas.


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


Repository: atlas


Description
-------

Exposes qualifiedName that can be set on Referenceable. In the backend, it creates unique index for this property for all class types and createEntity fails if there is another entity of the same type with the same qualified name


Diffs
-----

  repository/src/main/java/org/apache/atlas/repository/Constants.java d5d3b3c 
  repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1b0faa5 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java cc10ea3 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 10babed 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java ceb8a65 
  typesystem/src/main/java/org/apache/atlas/typesystem/IReferenceableInstance.java 9285014 
  typesystem/src/main/java/org/apache/atlas/typesystem/Referenceable.java 213e46c 
  typesystem/src/main/java/org/apache/atlas/typesystem/persistence/Id.java 641146a 
  typesystem/src/main/java/org/apache/atlas/typesystem/persistence/ReferenceableInstance.java 911a5f4 
  typesystem/src/main/java/org/apache/atlas/typesystem/types/ClassType.java cdfbf07 
  typesystem/src/main/scala/org/apache/atlas/typesystem/json/InstanceSerialization.scala f792858 
  webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java dcb460d 
  webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java e6a7325 

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


Testing
-------

UT and IT


Thanks,

Shwetha GS


Re: Review Request 37181: ATLAS-59 De-duping of entities

Posted by Shwetha GS <ss...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37181/
-----------------------------------------------------------

(Updated Aug. 10, 2015, 10:43 a.m.)


Review request for atlas.


Changes
-------

Adds referenceable type as a super type which contains qualified name as unique required attribute. Any class type that requires de-duping should extend this new type. 
Also added new API that gets entity definition by unique attribute name


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


Repository: atlas


Description
-------

Exposes qualifiedName that can be set on Referenceable. In the backend, it creates unique index for this property for all class types and createEntity fails if there is another entity of the same type with the same qualified name


Diffs (updated)
-----

  client/src/main/java/org/apache/atlas/AtlasClient.java 1c7d62a 
  dashboard/v2/public/modules/details/detailsResource.js af2f249 
  repository/src/main/java/org/apache/atlas/repository/EntityExistsException.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1b0faa5 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java cc10ea3 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java ceb8a65 
  repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java 56168db 
  repository/src/main/java/org/apache/atlas/services/MetadataService.java 8f82f88 
  repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java PRE-CREATION 
  typesystem/src/main/java/org/apache/atlas/TypeExistsException.java PRE-CREATION 
  typesystem/src/main/java/org/apache/atlas/typesystem/types/TypeSystem.java d1e8dbd 
  webapp/src/main/java/org/apache/atlas/web/resources/EntitiesResource.java PRE-CREATION 
  webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java dcb460d 
  webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java d6d5915 
  webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java e6a7325 

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


Testing
-------

UT and IT


Thanks,

Shwetha GS


Re: Review Request 37181: ATLAS-59 De-duping of entities

Posted by Shwetha GS <ss...@hortonworks.com>.

> On Aug. 6, 2015, 9:27 p.m., Seetharam Venkatesh wrote:
> > typesystem/src/main/java/org/apache/atlas/typesystem/persistence/ReferenceableInstance.java, line 44
> > <https://reviews.apache.org/r/37181/diff/1/?file=1033506#file1033506line44>
> >
> >     Can qualified name be computed?

Currently, to get an entity definition, the user has to make 2 calls - search to get guid and then get entity by guid. Instead, I want to provide another API to get the entity definition by qualified name. So, want to keep computation of qualified name client side

Also, expressing how qualified name should be computed on server is complex.


> On Aug. 6, 2015, 9:27 p.m., Seetharam Venkatesh wrote:
> > repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java, line 83
> > <https://reviews.apache.org/r/37181/diff/1/?file=1033499#file1033499line83>
> >
> >     Isnt RepositoryException an AtlasException?

Yes, will change to throws RepositoryException, EntityExistsException


- Shwetha


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


On Aug. 6, 2015, 11:59 a.m., Shwetha GS wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37181/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2015, 11:59 a.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-59
>     https://issues.apache.org/jira/browse/ATLAS-59
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Exposes qualifiedName that can be set on Referenceable. In the backend, it creates unique index for this property for all class types and createEntity fails if there is another entity of the same type with the same qualified name
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/Constants.java d5d3b3c 
>   repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1b0faa5 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java cc10ea3 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 10babed 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java ceb8a65 
>   typesystem/src/main/java/org/apache/atlas/typesystem/IReferenceableInstance.java 9285014 
>   typesystem/src/main/java/org/apache/atlas/typesystem/Referenceable.java 213e46c 
>   typesystem/src/main/java/org/apache/atlas/typesystem/persistence/Id.java 641146a 
>   typesystem/src/main/java/org/apache/atlas/typesystem/persistence/ReferenceableInstance.java 911a5f4 
>   typesystem/src/main/java/org/apache/atlas/typesystem/types/ClassType.java cdfbf07 
>   typesystem/src/main/scala/org/apache/atlas/typesystem/json/InstanceSerialization.scala f792858 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java dcb460d 
>   webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java e6a7325 
> 
> Diff: https://reviews.apache.org/r/37181/diff/
> 
> 
> Testing
> -------
> 
> UT and IT
> 
> 
> Thanks,
> 
> Shwetha GS
> 
>


Re: Review Request 37181: ATLAS-59 De-duping of entities

Posted by Seetharam Venkatesh <ve...@innerzeal.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37181/#review94445
-----------------------------------------------------------



repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java (line 83)
<https://reviews.apache.org/r/37181/#comment149053>

    Isnt RepositoryException an AtlasException?



typesystem/src/main/java/org/apache/atlas/typesystem/persistence/ReferenceableInstance.java (line 44)
<https://reviews.apache.org/r/37181/#comment149054>

    Can qualified name be computed?


- Seetharam Venkatesh


On Aug. 6, 2015, 11:59 a.m., Shwetha GS wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37181/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2015, 11:59 a.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-59
>     https://issues.apache.org/jira/browse/ATLAS-59
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Exposes qualifiedName that can be set on Referenceable. In the backend, it creates unique index for this property for all class types and createEntity fails if there is another entity of the same type with the same qualified name
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/Constants.java d5d3b3c 
>   repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1b0faa5 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java cc10ea3 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 10babed 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java ceb8a65 
>   typesystem/src/main/java/org/apache/atlas/typesystem/IReferenceableInstance.java 9285014 
>   typesystem/src/main/java/org/apache/atlas/typesystem/Referenceable.java 213e46c 
>   typesystem/src/main/java/org/apache/atlas/typesystem/persistence/Id.java 641146a 
>   typesystem/src/main/java/org/apache/atlas/typesystem/persistence/ReferenceableInstance.java 911a5f4 
>   typesystem/src/main/java/org/apache/atlas/typesystem/types/ClassType.java cdfbf07 
>   typesystem/src/main/scala/org/apache/atlas/typesystem/json/InstanceSerialization.scala f792858 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java dcb460d 
>   webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java e6a7325 
> 
> Diff: https://reviews.apache.org/r/37181/diff/
> 
> 
> Testing
> -------
> 
> UT and IT
> 
> 
> Thanks,
> 
> Shwetha GS
> 
>


Re: Review Request 37181: ATLAS-59 De-duping of entities

Posted by Suma Shivaprasad <su...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37181/#review94406
-----------------------------------------------------------



repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java (line 83)
<https://reviews.apache.org/r/37181/#comment148994>

    throws RepositoryException, EntityExistsException should be more clear?



repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java (line 117)
<https://reviews.apache.org/r/37181/#comment148992>

    Nice +1


- Suma Shivaprasad


On Aug. 6, 2015, 11:59 a.m., Shwetha GS wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37181/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2015, 11:59 a.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-59
>     https://issues.apache.org/jira/browse/ATLAS-59
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Exposes qualifiedName that can be set on Referenceable. In the backend, it creates unique index for this property for all class types and createEntity fails if there is another entity of the same type with the same qualified name
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/Constants.java d5d3b3c 
>   repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java 1b0faa5 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java cc10ea3 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java 10babed 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java ceb8a65 
>   typesystem/src/main/java/org/apache/atlas/typesystem/IReferenceableInstance.java 9285014 
>   typesystem/src/main/java/org/apache/atlas/typesystem/Referenceable.java 213e46c 
>   typesystem/src/main/java/org/apache/atlas/typesystem/persistence/Id.java 641146a 
>   typesystem/src/main/java/org/apache/atlas/typesystem/persistence/ReferenceableInstance.java 911a5f4 
>   typesystem/src/main/java/org/apache/atlas/typesystem/types/ClassType.java cdfbf07 
>   typesystem/src/main/scala/org/apache/atlas/typesystem/json/InstanceSerialization.scala f792858 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java dcb460d 
>   webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java e6a7325 
> 
> Diff: https://reviews.apache.org/r/37181/diff/
> 
> 
> Testing
> -------
> 
> UT and IT
> 
> 
> Thanks,
> 
> Shwetha GS
> 
>