Commit ba5b2dba by Madhan Neethiraj

ATLAS-3614: added configuration to specify default classification-propagation flag

parent c6cac030
...@@ -56,6 +56,8 @@ public enum AtlasConfiguration { ...@@ -56,6 +56,8 @@ public enum AtlasConfiguration {
RELATIONSHIP_WARN_NO_RELATIONSHIPS("atlas.relationships.warnOnNoRelationships", false), RELATIONSHIP_WARN_NO_RELATIONSHIPS("atlas.relationships.warnOnNoRelationships", false),
ENTITY_CHANGE_NOTIFY_IGNORE_RELATIONSHIP_ATTRIBUTES("atlas.entity.change.notify.ignore.relationship.attributes", true), 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 configuration
SEARCH_MAX_LIMIT("atlas.search.maxlimit", 10000), SEARCH_MAX_LIMIT("atlas.search.maxlimit", 10000),
SEARCH_DEFAULT_LIMIT("atlas.search.defaultlimit", 100), SEARCH_DEFAULT_LIMIT("atlas.search.defaultlimit", 100),
......
...@@ -104,6 +104,10 @@ public class AtlasClassification extends AtlasStruct implements Serializable { ...@@ -104,6 +104,10 @@ public class AtlasClassification extends AtlasStruct implements Serializable {
return propagate; return propagate;
} }
public Boolean getPropagate() {
return propagate;
}
public void setPropagate(Boolean propagate) { public void setPropagate(Boolean propagate) {
this.propagate = propagate; this.propagate = propagate;
} }
......
...@@ -126,6 +126,7 @@ public class EntityGraphMapper { ...@@ -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 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 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 GraphHelper graphHelper = GraphHelper.getInstance();
private final AtlasGraph graph; private final AtlasGraph graph;
...@@ -1861,10 +1862,11 @@ public class EntityGraphMapper { ...@@ -1861,10 +1862,11 @@ public class EntityGraphMapper {
if(reqContext.isImportInProgress() || reqContext.isInNotificationProcessing()) { if(reqContext.isImportInProgress() || reqContext.isInNotificationProcessing()) {
propagateTags = false; propagateTags = false;
classification.setPropagate(propagateTags);
} else { } else {
propagateTags = true; propagateTags = CLASSIFICATION_PROPAGATION_DEFAULT;
} }
classification.setPropagate(propagateTags);
} }
if (removePropagations == null) { if (removePropagations == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment