ATLAS-4859 : NPE during Atlas Import

Signed-off-by: Mandar Ambawane <mandar.ambawane@freestoneinfotech.com>
This commit is contained in:
priyanshi-shah26 2024-08-05 16:27:21 +05:30 committed by Mandar Ambawane
parent a6fbdf816e
commit 4e788f5d1f
1 changed files with 12 additions and 2 deletions

View File

@ -2255,8 +2255,18 @@ public class EntityGraphMapper {
} }
private boolean classificationHasPendingTask(AtlasTask task, String classificationVertexId, String entityGuid) { private boolean classificationHasPendingTask(AtlasTask task, String classificationVertexId, String entityGuid) {
return task.getParameters().get(ClassificationTask.PARAM_CLASSIFICATION_VERTEX_ID).equals(classificationVertexId) if (task.getParameters() != null) {
&& task.getParameters().get(ClassificationTask.PARAM_ENTITY_GUID).equals(entityGuid); if (classificationVertexId != null && entityGuid != null) {
return task.getParameters().get(ClassificationTask.PARAM_CLASSIFICATION_VERTEX_ID).equals(classificationVertexId)
&& task.getParameters().get(ClassificationTask.PARAM_ENTITY_GUID).equals(entityGuid);
} else {
LOG.warn("ClassificationVertexId and EntityGuid not found!");
return false;
}
} else {
LOG.warn("No task parameters found!");
return false;
}
} }
private AtlasEntity updateClassificationText(AtlasVertex vertex) throws AtlasBaseException { private AtlasEntity updateClassificationText(AtlasVertex vertex) throws AtlasBaseException {