Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATLAS-5006 : Atlas incremental export takes too much time (almost equ… #312

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

mandarambawane
Copy link
Contributor

…ivalent to bootstrap export with the entire data)

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix. Create an issue in ASF JIRA before opening a pull request and
set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. ATLAS-XXXX: Fix a typo in YYY))

How was this patch tested?

(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

@mandarambawane mandarambawane force-pushed the ATLAS-5006-0321-1724 branch 2 times, most recently from 5611589 to 1b68e37 Compare March 26, 2025 06:22
@@ -482,6 +482,10 @@ public AtlasEntitiesWithExtInfo toAtlasEntitiesWithExtInfo(List<String> guids, b
return ret;
}

public List<AtlasVertex> findAllRelationshipVertices(AtlasVertex vertex) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findAllRelationshipVertices() => findAllConnectedVertices()

}

public void extractRelatedVertices(AtlasVertex vertex, ExportContext context) {
List<AtlasVertex> relationshipEntities = entityGraphRetriever.findAllRelationshipVertices(vertex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findAllRelationshipVertices() => findAllConnectedVertices()

List<AtlasVertex> relationshipEntities = entityGraphRetriever.findAllRelationshipVertices(vertex);
if (CollectionUtils.isNotEmpty(relationshipEntities)) {
for (AtlasVertex e : relationshipEntities) {
String relGuid = AtlasGraphUtilsV2.getEncodedProperty(e, GUID_PROPERTY_KEY, String.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify that the vertex represents an entity before processing it further.

String typeName = GraphHelper.getTypeName(e);

if (typeRegistry.getEntityTypeByName(typeName) != null) {
  String guid = AtlasGraphUtilsV2.getEncodedProperty(e, GUID_PROPERTY_KEY, String.class);

  if (!context.guidsProcessed.contains(guid)) {
    context.guidsToProcess.add(guid);
  }
}


@mandarambawane mandarambawane force-pushed the ATLAS-5006-0321-1724 branch 2 times, most recently from b58fda1 to 868a577 Compare April 9, 2025 06:16
…ivalent to bootstrap export with the entire data)
@mandarambawane mandarambawane merged commit ab3257e into apache:master Apr 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants