Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
500ea95c
Commit
500ea95c
authored
4 years ago
by
Ashutosh Mestry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3902: Import Service: UpdateVertexGuid Now Makes Updates to AtlasEntityWithExtInfo
parent
9a067d38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
RegularImport.java
...s/repository/store/graph/v2/bulkimport/RegularImport.java
+11
-1
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/bulkimport/RegularImport.java
View file @
500ea95c
...
...
@@ -42,6 +42,7 @@ import org.apache.atlas.repository.store.graph.v2.EntityGraphRetriever;
import
org.apache.atlas.repository.store.graph.v2.EntityImportStream
;
import
org.apache.atlas.type.AtlasEntityType
;
import
org.apache.atlas.type.AtlasTypeRegistry
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -127,7 +128,7 @@ public class RegularImport extends ImportStrategy {
}
if
(
attempt
==
0
)
{
updateVertexGuid
(
entity
);
updateVertexGuid
(
entity
WithExtInfo
);
}
else
{
LOG
.
error
(
"Guid update failed: {}"
,
entityWithExtInfo
.
getEntity
().
getGuid
());
throw
e
;
...
...
@@ -153,6 +154,15 @@ public class RegularImport extends ImportStrategy {
}
@GraphTransaction
public
void
updateVertexGuid
(
AtlasEntityWithExtInfo
entityWithExtInfo
)
{
updateVertexGuid
(
entityWithExtInfo
.
getEntity
());
if
(
MapUtils
.
isEmpty
(
entityWithExtInfo
.
getReferredEntities
()))
{
return
;
}
for
(
AtlasEntity
entity
:
entityWithExtInfo
.
getReferredEntities
().
values
())
{
updateVertexGuid
(
entity
);
}
}
public
void
updateVertexGuid
(
AtlasEntity
entity
)
{
String
entityGuid
=
entity
.
getGuid
();
AtlasObjectId
objectId
=
entityGraphRetriever
.
toAtlasObjectIdWithoutGuid
(
entity
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment