You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Ashutosh Mestry (JIRA)" <ji...@apache.org> on 2017/09/08 21:57:00 UTC

[jira] [Comment Edited] (ATLAS-2120) Inconsistency in Importing already existing types on backup cluster with new definition.

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

Ashutosh Mestry edited comment on ATLAS-2120 at 9/8/17 9:56 PM:
----------------------------------------------------------------

[~ssainath] I am able to duplicate this problem on my unit test. 

Only that this is not a scenario we are supporting.

We are making best effort to merge the attributes. But for the case (like the one you have) where the same attribute is of different type, we are failing the import.

I think it will be good to close this bug.

CC: [~madhan.neethiraj]


was (Author: ashutoshm):
[~ssainath] I am able to duplicate this problem on my unit test.

> Inconsistency in Importing already existing types on backup cluster with new definition.
> ----------------------------------------------------------------------------------------
>
>                 Key: ATLAS-2120
>                 URL: https://issues.apache.org/jira/browse/ATLAS-2120
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>    Affects Versions: 0.9-incubating
>            Reporter: Sharmadha Sainath
>            Assignee: Ashutosh Mestry
>            Priority: Critical
>         Attachments: hdfs_path1.zip
>
>
> 1.Created a tag tag1 on cluster1 with attributes : 
> *                 attrib1 : string
> *                 attrib2 : integer
> 2.Created a tag with same name on cluster2 with attributes:
> *                    attrib1: date
> *                    attrib3: integer
> (Note the tag names are same , and attrib1 is same but datatypes of attrib1 are different in both the clusters)
> 3. On cluster1 , created an entity and associated the tag1 to the entity with attribute values
> *                    attrib1: "randstr"
> *                    attrib2: 5
>               and exported the entity into zip file .
> 4.Tried to import the entity into cluster2. 
> Import failed with 500 Internal server error and with following exception :
> {code}
> {"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException: org.apache.atlas.repository.graphdb.AtlasSchemaViolationException: com.thinkaurelius.titan.core.SchemaViolationException: Value [rand_str] is not an instance of the expected data type for property key [tag1.attrib1] and cannot be converted. Expected: class java.lang.Long, found: class java.lang.String"}
> {code}
> Following is the inconsistency observed :
> Entity is not imported into the cluster2 , but the type definition of tag1 in cluster2 had 3 attributes now (attrib1 : date , attrib2:Integer , attrib3:Integer) and 500 Internal server error is thrown.
> Normally, when a datatype of an attribute is attempted to be updated , Atlas throws the following exception and the type is not updated.
> {code}
> {"errorCode":"ATLAS-400-00-029","errorMessage":"Data type update for attribute is not supported"}
> {code}
> Expected the same to happen while importing (i.e) Import failing with Bad request with the proper error message.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)