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

Sharmadha Sainath commented on ATLAS-2120:
------------------------------------------

Steps to reproduce :
1. On cluster1 , created an hdfs_path with qualifiedname : path1
2.Created a tag on cluster1 - tag1 with attributes attrib1 : string , 
attrib2:int
3.Associated tag1 to path1 with values attrib1: randstr , attrib2:5
hdfs_path1.json 
{code}
{

"itemsToExport": [

{ "typeName": "hdfs_path", "uniqueAttributes": { "qualifiedName": "path1" } }

],

"options": null

}
{code}

4.Exported into zip file [^hdfs_path1.zip] using command :
{code}
curl -v  -X POST -u admin:admin -H "Content-Type: application/json" -H 
"Cache-Control: no-cache" -d @hdfs_path1.json 
"http://host1:21000/api/atlas/admin/export"; > hdfs_path1.zip
{code}
5.Tried to import to cluster2 using :
{code}
curl -v -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H 
"Cache-Control: no-cache" -F data=@hdfs_path1.zip 
"http://host2:21000/api/atlas/admin/import";
{code}
6 . Following exception was thrown :
{code}
{"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException:
 org.apache.atlas.repository.graphdb.AtlasSchemaViolationException: 
com.thinkaurelius.titan.core.SchemaViolationException: Value [randstr] 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}

CC : [~ashutoshm]

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

Reply via email to