atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shwetha GS <sshivalingamur...@hortonworks.com>
Subject Review Request 47841: ATLAS-826 Add support for singleton traits
Date Wed, 25 May 2016 18:54:13 GMT

-----------------------------------------------------------
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message