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


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

commit 5373cde5f4624e0989a41e9512e67f903d1fc26c
Author: Ashutosh Mestry <[email protected]>
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();

Reply via email to