[
https://issues.apache.org/jira/browse/ATLAS-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16462728#comment-16462728
]
Ashutosh Mestry edited comment on ATLAS-2523 at 5/3/18 4:32 PM:
----------------------------------------------------------------
Thanks [~grahamwallis] for the details. I get a better understanding of your
intent. This patch is fine as it is. I may have to make a small change at
another place where I am assigning GUID to an entity that is being imported
since this patch will make it redundant (not harmful).
It may be wroth removing these lines as I think it will make the code cleaner.
These are the lines that I will have to remove:
_EntityGraphMapper: line 762_
<code>
// for import use the relationship guid provided
if (context.isImport()) {
String relationshipGuid = getRelationshipGuid(ctx.getValue());
if(!StringUtils.isEmpty(relationshipGuid)) {
AtlasGraphUtilsV1.setProperty(ret,
Constants.RELATIONSHIP_GUID_PROPERTY_KEY, relationshipGuid);
}
}
</code>
was (Author: ashutoshm):
Thanks [~grahamwallis] for the details. I get a better understanding of your
intent. This patch is fine as it is. I may have to make a small change at
another place where I am assigning GUID to an entity that is being imported
since this patch will make it redundant (not harmful).
It may be wroth removing these lines as I think it will make the code cleaner.
These are the lines that I will have to remove:
_EntityGraphMapper: line 762_
<code>
_// for import use the relationship guid provided_
_if (context.isImport()) {_
_String relationshipGuid = getRelationshipGuid(ctx.getValue());_
_if(!StringUtils.isEmpty(relationshipGuid))_
_{ AtlasGraphUtilsV1.setProperty(ret,
Constants.RELATIONSHIP_GUID_PROPERTY_KEY, relationshipGuid); }_
_}_
</code>
> Import relationship, preserving existing GUID
> ---------------------------------------------
>
> Key: ATLAS-2523
> URL: https://issues.apache.org/jira/browse/ATLAS-2523
> Project: Atlas
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: Graham Wallis
> Priority: Major
> Fix For: 1.0.0
>
> Attachments: ATLAS-2523-2018-04-09.patch
>
>
> To add a relationship defined externally (in another metadata repository), I
> want to be able to add the relationship and maintain the existing GUID.
> This is possible for an entity by performing an import. It does not seem to
> be possible for relationships., because the relationship store always
> generates a new GUID, which overwrites the existing GUID.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)