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

madhan 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 b3abf70  ATLAS-3614: added configuration to specify default 
classification-propagation flag
b3abf70 is described below

commit b3abf70b44feced1ec760f3b3a51912a81ffdcd4
Author: Madhan Neethiraj <[email protected]>
AuthorDate: Wed Mar 11 09:53:42 2020 -0700

    ATLAS-3614: added configuration to specify default 
classification-propagation flag
    
    (cherry picked from commit ba5b2dba53387b11707a073538e7b804be19e0b3)
---
 intg/src/main/java/org/apache/atlas/AtlasConfiguration.java         | 2 ++
 .../java/org/apache/atlas/model/instance/AtlasClassification.java   | 4 ++++
 .../apache/atlas/repository/store/graph/v2/EntityGraphMapper.java   | 6 ++++--
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/intg/src/main/java/org/apache/atlas/AtlasConfiguration.java 
b/intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
index c5bf50d..5d8776b 100644
--- a/intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
+++ b/intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
@@ -56,6 +56,8 @@ public enum AtlasConfiguration {
     
RELATIONSHIP_WARN_NO_RELATIONSHIPS("atlas.relationships.warnOnNoRelationships", 
false),
     
ENTITY_CHANGE_NOTIFY_IGNORE_RELATIONSHIP_ATTRIBUTES("atlas.entity.change.notify.ignore.relationship.attributes",
 true),
 
+    
CLASSIFICATION_PROPAGATION_DEFAULT("atlas.classification.propagation.default", 
true),
+
     //search configuration
     SEARCH_MAX_LIMIT("atlas.search.maxlimit", 10000),
     SEARCH_DEFAULT_LIMIT("atlas.search.defaultlimit", 100),
diff --git 
a/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java 
b/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
index 0d20622..1edf4ee 100644
--- 
a/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
+++ 
b/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
@@ -104,6 +104,10 @@ public class AtlasClassification extends AtlasStruct 
implements Serializable {
         return propagate;
     }
 
+    public Boolean getPropagate() {
+        return propagate;
+    }
+
     public void setPropagate(Boolean propagate) {
         this.propagate = propagate;
     }
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 291d8b5..f4b1e55 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
@@ -126,6 +126,7 @@ public class EntityGraphMapper {
     private static final int     CUSTOM_ATTRIBUTE_VALUE_MAX_LENGTH = 
AtlasConfiguration.CUSTOM_ATTRIBUTE_VALUE_MAX_LENGTH.getInt();
 
     private static final boolean 
ENTITY_CHANGE_NOTIFY_IGNORE_RELATIONSHIP_ATTRIBUTES = 
AtlasConfiguration.ENTITY_CHANGE_NOTIFY_IGNORE_RELATIONSHIP_ATTRIBUTES.getBoolean();
+    private static final boolean CLASSIFICATION_PROPAGATION_DEFAULT            
      = AtlasConfiguration.CLASSIFICATION_PROPAGATION_DEFAULT.getBoolean();
 
     private final GraphHelper               graphHelper = 
GraphHelper.getInstance();
     private final AtlasGraph                graph;
@@ -1861,10 +1862,11 @@ public class EntityGraphMapper {
 
                     if(reqContext.isImportInProgress() || 
reqContext.isInNotificationProcessing()) {
                         propagateTags = false;
-                        classification.setPropagate(propagateTags);
                     } else {
-                        propagateTags = true;
+                        propagateTags = CLASSIFICATION_PROPAGATION_DEFAULT;
                     }
+
+                    classification.setPropagate(propagateTags);
                 }
 
                 if (removePropagations == null) {

Reply via email to