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 2016/05/25 18:54:13 UTC
Review Request 47841: ATLAS-826 Add support for singleton traits
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47841/
-----------------------------------------------------------
Review request for atlas.
Bugs: ATLAS-826
https://issues.apache.org/jira/browse/ATLAS-826
Repository: atlas
Description
-------
Adds support for singleton traits:
1. while defining trait type, trait can be marked as singleton
2. The first time the trait is associated with an entity, the trait instance is created
3. When the singleton trait is associated to another entity, the old instance of the trait is used
4. When the singleton trait is deleted for an entity, just the edge reference is removed(singleton trait instance is never deleted)
5. Modified UI to pass the singleton attribute in trait type definition - but doesn't seem to work, will check tomorrow
6. Updated type store to store the new attribute 'singleton'
Note:
1. trait type definition json adds new attribute called 'singleton' and is not backward compatible. Lets handle the backward compatibity in another jira, need to fix it for description as well
2. There is no way to directly create singleton trait instance(its created the first time the singleton trait is associated with the entity). Can be addressed in another jira again
3. When the singleton trait is associated with entity the second time, the trait attribute values are not used. This may be confusing for the user, but can't think of any clean way of enabling this
Diffs
-----
addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/model/FalconDataModelGenerator.java 397dea4
addons/hive-bridge/src/main/java/org/apache/atlas/hive/model/HiveDataModelGenerator.java 347405c
addons/sqoop-bridge/src/main/java/org/apache/atlas/sqoop/model/SqoopDataModelGenerator.java c3bdbfa
catalog/src/main/java/org/apache/atlas/catalog/DefaultTypeSystem.java f71c061
dashboardv2/public/js/views/tag/TagLayoutView.js 03adfbc
repository/src/main/java/org/apache/atlas/repository/Constants.java 893f1b6
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 91f9bd0
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java 0d82d90
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 4f6d011
repository/src/main/java/org/apache/atlas/repository/graph/HardDeleteHandler.java 3636791
repository/src/main/java/org/apache/atlas/repository/graph/SoftDeleteHandler.java 25aa7c5
repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java 4c1f559
repository/src/main/java/org/apache/atlas/repository/typestore/GraphBackedTypeStore.java 5ed9e02
repository/src/test/java/org/apache/atlas/BaseRepositoryTest.java d1f9430
repository/src/test/java/org/apache/atlas/TestUtils.java 345e874
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryTest.java 2d1c33a
repository/src/test/java/org/apache/atlas/repository/typestore/GraphBackedTypeStoreTest.java 961442b
repository/src/test/scala/org/apache/atlas/query/QueryTestsUtils.scala b5faaf3
typesystem/src/main/java/org/apache/atlas/typesystem/types/HierarchicalTypeDefinition.java 9a299f0
typesystem/src/main/java/org/apache/atlas/typesystem/types/TraitType.java f23bf5b
typesystem/src/main/java/org/apache/atlas/typesystem/types/TypeSystem.java 14f1968
typesystem/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java ef8448d
typesystem/src/main/scala/org/apache/atlas/typesystem/json/TypesSerialization.scala 5618938
typesystem/src/test/java/org/apache/atlas/typesystem/json/SerializationJavaTest.java eb1a15a
typesystem/src/test/java/org/apache/atlas/typesystem/types/ClassTest.java daecdd7
typesystem/src/test/java/org/apache/atlas/typesystem/types/TraitTest.java 31bfb2c
typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java 574e0f9
Diff: https://reviews.apache.org/r/47841/diff/
Testing
-------
Added UTs
Thanks,
Shwetha GS
Re: Review Request 47841: ATLAS-826 Add support for singleton traits
Posted by Suma Shivaprasad <su...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47841/#review134884
-----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java (line 196)
<https://reviews.apache.org/r/47841/#comment199827>
with this is there any way to delete singleton traits if no references exist to that trait?
- Suma Shivaprasad
On May 25, 2016, 6:54 p.m., Shwetha GS wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47841/
> -----------------------------------------------------------
>
> (Updated May 25, 2016, 6:54 p.m.)
>
>
> Review request for atlas.
>
>
> Bugs: ATLAS-826
> https://issues.apache.org/jira/browse/ATLAS-826
>
>
> Repository: atlas
>
>
> Description
> -------
>
> Adds support for singleton traits:
> 1. while defining trait type, trait can be marked as singleton
> 2. The first time the trait is associated with an entity, the trait instance is created
> 3. When the singleton trait is associated to another entity, the old instance of the trait is used
> 4. When the singleton trait is deleted for an entity, just the edge reference is removed(singleton trait instance is never deleted)
> 5. Modified UI to pass the singleton attribute in trait type definition - but doesn't seem to work, will check tomorrow
> 6. Updated type store to store the new attribute 'singleton'
>
> Note:
> 1. trait type definition json adds new attribute called 'singleton' and is not backward compatible. Lets handle the backward compatibity in another jira, need to fix it for description as well
> 2. There is no way to directly create singleton trait instance(its created the first time the singleton trait is associated with the entity). Can be addressed in another jira again
> 3. When the singleton trait is associated with entity the second time, the trait attribute values are not used. This may be confusing for the user, but can't think of any clean way of enabling this
>
>
> Diffs
> -----
>
> addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/model/FalconDataModelGenerator.java 397dea4
> addons/hive-bridge/src/main/java/org/apache/atlas/hive/model/HiveDataModelGenerator.java 347405c
> addons/sqoop-bridge/src/main/java/org/apache/atlas/sqoop/model/SqoopDataModelGenerator.java c3bdbfa
> catalog/src/main/java/org/apache/atlas/catalog/DefaultTypeSystem.java f71c061
> dashboardv2/public/js/views/tag/TagLayoutView.js 03adfbc
> repository/src/main/java/org/apache/atlas/repository/Constants.java 893f1b6
> repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 91f9bd0
> repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java 0d82d90
> repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 4f6d011
> repository/src/main/java/org/apache/atlas/repository/graph/HardDeleteHandler.java 3636791
> repository/src/main/java/org/apache/atlas/repository/graph/SoftDeleteHandler.java 25aa7c5
> repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java 4c1f559
> repository/src/main/java/org/apache/atlas/repository/typestore/GraphBackedTypeStore.java 5ed9e02
> repository/src/test/java/org/apache/atlas/BaseRepositoryTest.java d1f9430
> repository/src/test/java/org/apache/atlas/TestUtils.java 345e874
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryTest.java 2d1c33a
> repository/src/test/java/org/apache/atlas/repository/typestore/GraphBackedTypeStoreTest.java 961442b
> repository/src/test/scala/org/apache/atlas/query/QueryTestsUtils.scala b5faaf3
> typesystem/src/main/java/org/apache/atlas/typesystem/types/HierarchicalTypeDefinition.java 9a299f0
> typesystem/src/main/java/org/apache/atlas/typesystem/types/TraitType.java f23bf5b
> typesystem/src/main/java/org/apache/atlas/typesystem/types/TypeSystem.java 14f1968
> typesystem/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java ef8448d
> typesystem/src/main/scala/org/apache/atlas/typesystem/json/TypesSerialization.scala 5618938
> typesystem/src/test/java/org/apache/atlas/typesystem/json/SerializationJavaTest.java eb1a15a
> typesystem/src/test/java/org/apache/atlas/typesystem/types/ClassTest.java daecdd7
> typesystem/src/test/java/org/apache/atlas/typesystem/types/TraitTest.java 31bfb2c
> typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java 574e0f9
>
> Diff: https://reviews.apache.org/r/47841/diff/
>
>
> Testing
> -------
>
> Added UTs
>
>
> Thanks,
>
> Shwetha GS
>
>
Re: Review Request 47841: ATLAS-826 Add support for singleton traits
Posted by Suma Shivaprasad <su...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47841/#review134887
-----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java (line 661)
<https://reviews.apache.org/r/47841/#comment199831>
if there any way to support trait attribute updates by its type for singleton traits ?
- Suma Shivaprasad
On May 25, 2016, 6:54 p.m., Shwetha GS wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47841/
> -----------------------------------------------------------
>
> (Updated May 25, 2016, 6:54 p.m.)
>
>
> Review request for atlas.
>
>
> Bugs: ATLAS-826
> https://issues.apache.org/jira/browse/ATLAS-826
>
>
> Repository: atlas
>
>
> Description
> -------
>
> Adds support for singleton traits:
> 1. while defining trait type, trait can be marked as singleton
> 2. The first time the trait is associated with an entity, the trait instance is created
> 3. When the singleton trait is associated to another entity, the old instance of the trait is used
> 4. When the singleton trait is deleted for an entity, just the edge reference is removed(singleton trait instance is never deleted)
> 5. Modified UI to pass the singleton attribute in trait type definition - but doesn't seem to work, will check tomorrow
> 6. Updated type store to store the new attribute 'singleton'
>
> Note:
> 1. trait type definition json adds new attribute called 'singleton' and is not backward compatible. Lets handle the backward compatibity in another jira, need to fix it for description as well
> 2. There is no way to directly create singleton trait instance(its created the first time the singleton trait is associated with the entity). Can be addressed in another jira again
> 3. When the singleton trait is associated with entity the second time, the trait attribute values are not used. This may be confusing for the user, but can't think of any clean way of enabling this
>
>
> Diffs
> -----
>
> addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/model/FalconDataModelGenerator.java 397dea4
> addons/hive-bridge/src/main/java/org/apache/atlas/hive/model/HiveDataModelGenerator.java 347405c
> addons/sqoop-bridge/src/main/java/org/apache/atlas/sqoop/model/SqoopDataModelGenerator.java c3bdbfa
> catalog/src/main/java/org/apache/atlas/catalog/DefaultTypeSystem.java f71c061
> dashboardv2/public/js/views/tag/TagLayoutView.js 03adfbc
> repository/src/main/java/org/apache/atlas/repository/Constants.java 893f1b6
> repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 91f9bd0
> repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java 0d82d90
> repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 4f6d011
> repository/src/main/java/org/apache/atlas/repository/graph/HardDeleteHandler.java 3636791
> repository/src/main/java/org/apache/atlas/repository/graph/SoftDeleteHandler.java 25aa7c5
> repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java 4c1f559
> repository/src/main/java/org/apache/atlas/repository/typestore/GraphBackedTypeStore.java 5ed9e02
> repository/src/test/java/org/apache/atlas/BaseRepositoryTest.java d1f9430
> repository/src/test/java/org/apache/atlas/TestUtils.java 345e874
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryTest.java 2d1c33a
> repository/src/test/java/org/apache/atlas/repository/typestore/GraphBackedTypeStoreTest.java 961442b
> repository/src/test/scala/org/apache/atlas/query/QueryTestsUtils.scala b5faaf3
> typesystem/src/main/java/org/apache/atlas/typesystem/types/HierarchicalTypeDefinition.java 9a299f0
> typesystem/src/main/java/org/apache/atlas/typesystem/types/TraitType.java f23bf5b
> typesystem/src/main/java/org/apache/atlas/typesystem/types/TypeSystem.java 14f1968
> typesystem/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java ef8448d
> typesystem/src/main/scala/org/apache/atlas/typesystem/json/TypesSerialization.scala 5618938
> typesystem/src/test/java/org/apache/atlas/typesystem/json/SerializationJavaTest.java eb1a15a
> typesystem/src/test/java/org/apache/atlas/typesystem/types/ClassTest.java daecdd7
> typesystem/src/test/java/org/apache/atlas/typesystem/types/TraitTest.java 31bfb2c
> typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java 574e0f9
>
> Diff: https://reviews.apache.org/r/47841/diff/
>
>
> Testing
> -------
>
> Added UTs
>
>
> Thanks,
>
> Shwetha GS
>
>