You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by am...@apache.org on 2020/11/25 05:23:24 UTC

[atlas] branch branch-2.0 updated: ATLAS-4048: Import Service: Entity Update: Businessmetada changes.

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

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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 5ee9421  ATLAS-4048: Import Service: Entity Update: Businessmetada changes.
5ee9421 is described below

commit 5ee942188d23f23d7fab83595b8abdc16af53ff1
Author: Ashutosh Mestry <am...@cloudera.com>
AuthorDate: Tue Nov 24 21:04:22 2020 -0800

    ATLAS-4048: Import Service: Entity Update: Businessmetada changes.
---
 .../atlas/repository/store/graph/v2/AtlasEntityStoreV2.java      | 9 +++++++++
 1 file changed, 9 insertions(+)

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 7cf77ea..b80e42e 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
@@ -1208,6 +1208,15 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
                         }
                     }
 
+                    if (!hasUpdates && replaceBusinessAttributes) {
+                        Map<String, Map<String, Object>> currBusinessMetadata = entityRetriever.getBusinessMetadata(vertex);
+                        Map<String, Map<String, Object>> newBusinessMetadata  = entity.getBusinessAttributes();
+
+                        if (!Objects.equals(currBusinessMetadata, newBusinessMetadata)) {
+                            hasUpdates = true;
+                        }
+                    }
+
                     // if classifications are to be replaced, then skip updates only when no change in classifications
                     if (!hasUpdates && replaceClassifications) {
                         List<AtlasClassification> newVal  = entity.getClassifications();