Commit 0d5c2229 by Ashutosh Mestry Committed by Sarath Subramanian

ATLAS-3381: Atlas Patch Handler: Patch Handlers Not Committing Changes #2…

ATLAS-3381: Atlas Patch Handler: Patch Handlers Not Committing Changes #2 Improved check to detect classification presence Signed-off-by: 's avatarSarath Subramanian <sarath@apache.org>
parent 952d0696
...@@ -36,6 +36,7 @@ import org.apache.atlas.model.instance.EntityMutationResponse; ...@@ -36,6 +36,7 @@ import org.apache.atlas.model.instance.EntityMutationResponse;
import org.apache.atlas.model.instance.EntityMutations.EntityOperation; import org.apache.atlas.model.instance.EntityMutations.EntityOperation;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef; import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.Cardinality; 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.RepositoryException;
import org.apache.atlas.repository.converters.AtlasInstanceConverter; import org.apache.atlas.repository.converters.AtlasInstanceConverter;
import org.apache.atlas.repository.graph.FullTextMapperV2; import org.apache.atlas.repository.graph.FullTextMapperV2;
...@@ -1697,7 +1698,8 @@ public class EntityGraphMapper { ...@@ -1697,7 +1698,8 @@ public class EntityGraphMapper {
} }
public void updateClassificationTextAndNames(AtlasVertex vertex) throws AtlasBaseException { 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; return;
} }
......
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