atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vimal Sharma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ATLAS-1318) Atlas Type System does not have DELETE API
Date Mon, 12 Dec 2016 08:27:00 GMT

    [ https://issues.apache.org/jira/browse/ATLAS-1318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15741306#comment-15741306
] 

Vimal Sharma commented on ATLAS-1318:
-------------------------------------

[~breadpowder] 

1) When deleting a type T, the approach would be to delete all the types T_Ref (and all entities
of T_Ref as well) which have reference to T. Otherwise for the entities of  type T_Ref, there
would be a "ghost" reference to a type which doesn't exist. "System" types are guaranteed
to not have such references to "Custom" types. So we can relax the criteria 3 for considering
DELETION of type T. The earlier suggestion was a "playing it safe" alternative when dealing
with System types. So, on DELETE request of a Type T, below steps can be followed:
   A) Verify whether T is a "Custom" type
   B) Find all "Custom" types T_Ref which have reference to T
   C) Remove all entities of type T_Ref
   D) Remove type T_Ref
   E) Remove all entities of type T
   F) Remove type T

2) Please go ahead with adding an optional attribute (maybe "typeKind") to identify whether
a type is a "Custom" or "System" type. The types for which this attribute will not be available
will be treated as "System" attributes.

3) I am not aware of any direct request to get type hierarchy. We might have to get all the
types using call "/api/atlas/types" and then scan for references in "/api/atlas/types/{typeName}"

P.S. There is a catch in step B of point 1. What if, for some "Custom" type T_Ref which has
reference to T, user forgot to add "Custom" attribute. Now that the type T is removed,  there
will be "ghost" references to T from T_Ref. One solution is to look for references to T in
all types and if any non "Custom" type has reference to T, we should abort the delete.

> Atlas Type System does not have DELETE API
> ------------------------------------------
>
>                 Key: ATLAS-1318
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1318
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 0.7-incubating
>            Reporter: Zineng Yuan
>
> I am trying to extend Atlas Type System by adding custom data type. However, when I found
a type name was misspecified and needed to be recreated, I can't find a Restful Delete API.
> Question is does Atlas expose a Delete API for custom data types/attributes? Without
this delete API, it's difficult to rely on Atlas as a meta store to extend custom data.  
> Please do suggest how to recreate a data type in this case. Thank you! 
>  



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

Mime
View raw message