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

Madhan Neethiraj edited comment on ATLAS-1715 at 4/25/17 10:28 PM:
-------------------------------------------------------------------

[~ayubkhan] - I guess you did export/import on the same Atlas instance, with 
the following steps:

# Hive: create database db1
# Atlas: export database db1 => db1.zip
# Hive: delete database db1
# Atlas: import db1.zip

If these were the steps, then the behavior you found is 'as designed', since 
import is expected to restore the entities in the import source into Atlas. In 
this case, the status of 'db1' in import source db1.zip is ACTIVE; and given 
that the entity guid in Atlas matches the guid in import source, it ends up 
updating the status of the existing entity.


was (Author: ashutoshm):
Since this functionality has not been implemented, this is technically not a 
bug. It will be an improvement.
Given that export-import functionality is going to be used in backup recovery 
and replication, it would not be useful if we do not replicate correctly.

Scenario: Cluster CL1 needs to be replicated to cluster CL2. Consumer initiates 
an export on CL1, copies over the generated ZIP to CL2 and starts an import 
with appropriate options.

In the scenario described, it would not be a good idea to add changes to the 
import process. That would prevent CL2 being replica of CL1. Granted that some 
minor changes would be necessary so that the replicated entities look like they 
belong to CL2.

Hope this makes sense.

/CC [~madhan.neethiraj]

> If there exists a [DELETED] entity with the same in atlas and importing an 
> entity with the same name results in updating the deleted entity.  Instead it 
> should create a new entity.
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ATLAS-1715
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1715
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>    Affects Versions: 0.8-incubating
>            Reporter: Ayub Pathan
>            Priority: Critical
>             Fix For: trunk, 0.9-incubating
>
>
> If there exists a [DELETED] entity with the same in atlas and importing an 
> entity with the same name results in updating the deleted entity.  Instead it 
> should create a new entity.
> STR:
> * Create a hive database db1.
> * Using Atlas export call, get the db1 information exported to a zip file.
> * Drop the hive database(db1).
> * Import the zip file, using atlas import api call.
> Since the entity is already deleted, import call should create a new entity 
> for the metadata. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to