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 G S (JIRA)" <ji...@apache.org> on 2016/05/25 18:55:12 UTC

[jira] [Updated] (ATLAS-826) Add support for singleton traits

     [ https://issues.apache.org/jira/browse/ATLAS-826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shwetha G S updated ATLAS-826:
------------------------------
    Attachment: ATLAS-826.patch

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

> Add support for singleton traits
> --------------------------------
>
>                 Key: ATLAS-826
>                 URL: https://issues.apache.org/jira/browse/ATLAS-826
>             Project: Atlas
>          Issue Type: Improvement
>            Reporter: Shwetha G S
>            Assignee: Shwetha G S
>             Fix For: 0.7-incubating
>
>         Attachments: ATLAS-826.patch
>
>
> Currently, new trait instance is created everytime the trait is associated with an entity. For cases, where there are no trait attributes, its optimal for storage to share the same trait instance. There can also be cases where the trait instances need to be shared(for example, business catalog where terms are modeled as traits). The concept of singleton trait where single instance of trait is shared is useful in these cases



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)