This is an automated email from the ASF dual-hosted git repository.

amestry pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 4ab95b9adafd3d845b626d2d82bd2b3aa23be691
Author: Ashutosh Mestry <ames...@cloudera.com>
AuthorDate: Fri Nov 13 10:26:25 2020 -0800

    ATLAS-4025 ATLAS-4023: Import Service: Lables and Classifications not 
getting updated.
---
 .../apache/atlas/repository/store/graph/v2/EntityGraphMapper.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
index 14876b1..2cfcc0b 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
@@ -255,6 +255,10 @@ public class EntityGraphMapper {
         if (entity.getCustomAttributes() != null) {
             setCustomAttributes(vertex, entity);
         }
+
+        if (entity.getLabels() != null) {
+            setLabels(vertex, entity.getLabels());
+        }
     }
 
     public EntityMutationResponse 
mapAttributesAndClassifications(EntityMutationContext context, final boolean 
isPartialUpdate, final boolean replaceClassifications, boolean 
replaceBusinessAttributes) throws AtlasBaseException {
@@ -299,8 +303,6 @@ public class EntityGraphMapper {
                 mapAttributes(updatedEntity, entityType, vertex, updateType, 
context);
                 setCustomAttributes(vertex,updatedEntity);
 
-                resp.addEntity(updateType, constructHeader(updatedEntity, 
vertex));
-
                 if (replaceClassifications) {
                     deleteClassifications(guid);
                     addClassifications(context, guid, 
updatedEntity.getClassifications());
@@ -310,6 +312,7 @@ public class EntityGraphMapper {
                     setBusinessAttributes(vertex, entityType, 
updatedEntity.getBusinessAttributes());
                 }
 
+                resp.addEntity(updateType, constructHeader(updatedEntity, 
vertex));
                 reqContext.cache(updatedEntity);
             }
         }

Reply via email to