This is an automated email from the ASF dual-hosted git repository.
sarath 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 0d5c222 ATLAS-3381: Atlas Patch Handler: Patch Handlers Not
Committing Changes #2 Improved check to detect classification presence
0d5c222 is described below
commit 0d5c22298cacdf95531757048fd4b1596ed3b044
Author: Ashutosh Mestry <[email protected]>
AuthorDate: Tue Aug 20 09:04:54 2019 -0700
ATLAS-3381: Atlas Patch Handler: Patch Handlers Not Committing Changes #2
Improved check to detect classification presence
Signed-off-by: Sarath Subramanian <[email protected]>
---
.../org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 145e700..8ddbf74 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
@@ -36,6 +36,7 @@ import org.apache.atlas.model.instance.EntityMutationResponse;
import org.apache.atlas.model.instance.EntityMutations.EntityOperation;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
import
org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.Cardinality;
+import org.apache.atlas.repository.Constants;
import org.apache.atlas.repository.RepositoryException;
import org.apache.atlas.repository.converters.AtlasInstanceConverter;
import org.apache.atlas.repository.graph.FullTextMapperV2;
@@ -1697,7 +1698,8 @@ public class EntityGraphMapper {
}
public void updateClassificationTextAndNames(AtlasVertex vertex) throws
AtlasBaseException {
- if (StringUtils.isEmpty(vertex.getProperty(CLASSIFICATION_NAMES_KEY,
String.class))) {
+
if(CollectionUtils.isEmpty(vertex.getPropertyValues(Constants.TRAIT_NAMES_PROPERTY_KEY,
String.class)) &&
+
CollectionUtils.isEmpty(vertex.getPropertyValues(Constants.PROPAGATED_TRAIT_NAMES_PROPERTY_KEY,
String.class))) {
return;
}