You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2018/03/27 17:13:42 UTC

atlas git commit: ATLAS-2510: Add support to disable/enable propagated classification in entity - fix UT failure

Repository: atlas
Updated Branches:
  refs/heads/master 0f689faaa -> 295595db4


ATLAS-2510: Add support to disable/enable propagated classification in entity - fix UT failure


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/295595db
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/295595db
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/295595db

Branch: refs/heads/master
Commit: 295595db4828f4f85977fa809ba53d723d18c668
Parents: 0f689fa
Author: Sarath Subramanian <ss...@hortonworks.com>
Authored: Tue Mar 27 10:13:30 2018 -0700
Committer: Sarath Subramanian <ss...@hortonworks.com>
Committed: Tue Mar 27 10:13:30 2018 -0700

----------------------------------------------------------------------
 .../atlas/repository/store/graph/v1/EntityGraphMapper.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/295595db/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
index 737e933..2d8b153 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
@@ -1739,15 +1739,17 @@ public class EntityGraphMapper {
     }
 
     public void deleteClassifications(String guid) throws AtlasBaseException {
-
         AtlasVertex instanceVertex = AtlasGraphUtilsV1.findByGuid(guid);
+
         if (instanceVertex == null) {
             throw new AtlasBaseException(AtlasErrorCode.INSTANCE_GUID_NOT_FOUND, guid);
         }
 
         List<String> traitNames = getTraitNames(instanceVertex);
 
-        deleteClassifications(guid, traitNames);
+        if (CollectionUtils.isNotEmpty(traitNames)) {
+            deleteClassifications(guid, traitNames);
+        }
     }
 
     private void updateTraitNamesProperty(AtlasVertex entityVertex, List<String> traitNames) {