This is an automated email from the ASF dual-hosted git repository. nixon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push: new 37d64be ATLAS-3699 : Update authorization for Update-Entity for audit logs for DENY policy 37d64be is described below commit 37d64be5c3f88de935919b806baafa5d8e250f5b Author: chaitali borole <chaitali.bor...@cloudera.com> AuthorDate: Mon Mar 30 18:21:48 2020 +0530 ATLAS-3699 : Update authorization for Update-Entity for audit logs for DENY policy Signed-off-by: nixonrodrigues <ni...@apache.org> --- .../apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java | 4 +--- .../org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java index a1bf18e..195c32b 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java @@ -1070,7 +1070,7 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore { } } - private EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate, boolean replaceClassifications, boolean replaceBusinessAttributes) throws AtlasBaseException { + private EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate, boolean replaceClassifications, boolean replaceBusinessAttributes) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> createOrUpdate()"); } @@ -1274,8 +1274,6 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore { requestContext.recordEntityGuidUpdate(entity, guid); } - entityGraphMapper.setCustomAttributes(vertex, entity); - context.addUpdated(guid, entity, entityType, vertex); } else { graphDiscoverer.validateAndNormalize(entity); 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 75b016c..e493847 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 @@ -273,6 +273,7 @@ public class EntityGraphMapper { mapRelationshipAttributes(createdEntity, entityType, vertex, CREATE, context); mapAttributes(createdEntity, entityType, vertex, CREATE, context); + setCustomAttributes(vertex,createdEntity); resp.addEntity(CREATE, constructHeader(createdEntity, entityType, vertex)); addClassifications(context, guid, createdEntity.getClassifications()); @@ -292,6 +293,7 @@ public class EntityGraphMapper { mapRelationshipAttributes(updatedEntity, entityType, vertex, UPDATE, context); mapAttributes(updatedEntity, entityType, vertex, UPDATE, context); + setCustomAttributes(vertex,updatedEntity); if (isPartialUpdate) { resp.addEntity(PARTIAL_UPDATE, constructHeader(updatedEntity, entityType, vertex));