Repository: atlas
Updated Branches:
refs/heads/master 8063de4ad -> 7f20ffbaf
Advertising
ATLAS-2558: Reevaluate propagated tags based on blocked classifications in
relationship edge #2
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/7f20ffba
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/7f20ffba
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/7f20ffba
Branch: refs/heads/master
Commit: 7f20ffbaf4bad3245a547714a8f355f730363cc1
Parents: 8063de4
Author: Sarath Subramanian <ssubraman...@hortonworks.com>
Authored: Mon Apr 16 10:10:43 2018 -0700
Committer: Sarath Subramanian <ssubraman...@hortonworks.com>
Committed: Mon Apr 16 10:10:43 2018 -0700
----------------------------------------------------------------------
.../repository/store/graph/v1/AtlasRelationshipStoreV1.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/7f20ffba/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java
----------------------------------------------------------------------
diff --git
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java
index 70877f3..4e42ef1 100644
---
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java
+++
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java
@@ -449,10 +449,11 @@ public class AtlasRelationshipStoreV1 implements
AtlasRelationshipStore {
} else {
for (AtlasVertex classificationVertex :
updatedClassificationsMap.keySet()) {
- List<AtlasVertex> currentPropagatingEntities =
currentClassificationsMap.get(classificationVertex);
- List<AtlasVertex> updatedPropagatingEntities =
updatedClassificationsMap.get(classificationVertex);
- List<AtlasVertex> entitiesAdded =
(List<AtlasVertex>) CollectionUtils.subtract(updatedPropagatingEntities,
currentPropagatingEntities);
- List<AtlasVertex> entitiesRemoved =
(List<AtlasVertex>) CollectionUtils.subtract(currentPropagatingEntities,
updatedPropagatingEntities);
+ List<AtlasVertex> currentPropagatingEntities =
currentClassificationsMap.containsKey(classificationVertex) ?
currentClassificationsMap.get(classificationVertex) : Collections.emptyList();
+ List<AtlasVertex> updatedPropagatingEntities =
updatedClassificationsMap.containsKey(classificationVertex) ?
updatedClassificationsMap.get(classificationVertex) : Collections.emptyList();
+
+ List<AtlasVertex> entitiesAdded = (List<AtlasVertex>)
CollectionUtils.subtract(updatedPropagatingEntities,
currentPropagatingEntities);
+ List<AtlasVertex> entitiesRemoved = (List<AtlasVertex>)
CollectionUtils.subtract(currentPropagatingEntities,
updatedPropagatingEntities);
if (CollectionUtils.isNotEmpty(entitiesAdded)) {
addPropagationsMap.put(classificationVertex,
entitiesAdded);