You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "rkundam (via GitHub)" <gi...@apache.org> on 2026/06/26 05:01:20 UTC

Re: [PR] ATLAS-4889: Incremental export : When an entity has tag propagated an… [atlas]

rkundam commented on code in PR #399:
URL: https://github.com/apache/atlas/pull/399#discussion_r3479225209


##########
repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java:
##########
@@ -413,6 +436,91 @@ private void addEntity(AtlasEntityWithExtInfo entityWithExtInfo, ExportContext c
         context.reportProgress();
     }
 
+    public void addEntityGuids(String guid, ExportContext context, RelationshipAttributesExtractor relationshipAttributesExtractor) throws AtlasBaseException {
+        AtlasVertex adjacentVertex;
+        Iterator<AtlasEdge> entityEdges;
+        Iterator<AtlasVertex> propagateClassificationVertices;
+        Iterator<AtlasVertex> appliedClassificationVertices;
+        String fetchedClassificationGuid;
+        List<AtlasClassification> processedClassifications = new ArrayList<>();
+
+        AtlasVertex initialEntityVertex = entityGraphRetriever.getEntityVertex(guid);
+        for (AtlasClassification currentClassification : entityGraphRetriever.getAllClassifications(initialEntityVertex)) {
+            if (context.guidsProcessed.contains(currentClassification.getEntityGuid())) {
+                processedClassifications.add(currentClassification);
+            }
+        }
+        context.newAddedGuids.add(guid);
+        while (!context.newAddedGuids.isEmpty()) {
+            String currentGuid = context.newAddedGuids.poll();
+
+            AtlasVertex entityVertex = entityGraphRetriever.getEntityVertex(currentGuid);
+            String entityTypeName = getTypeName(entityVertex);
+            List<AtlasClassification> classifications = entityGraphRetriever.getAllClassifications(entityVertex);
+            if (CollectionUtils.isNotEmpty(processedClassifications)) {
+                classifications.removeAll(processedClassifications);
+            }
+            if (CollectionUtils.isNotEmpty(classifications)) {
+                for (AtlasClassification classification : classifications) {
+                    String classificationName = classification.getTypeName();
+                    boolean isProcess = relationshipAttributesExtractor.isLineageType(entityTypeName);

Review Comment:
   Lines 466 to 469 can be moved out of for loop



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@atlas.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org