You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2019/03/14 07:38:24 UTC
[atlas] branch master updated: ATLAS-3067: fix for IT failures
caused by changes in hive-preprocessor
This is an automated email from the ASF dual-hosted git repository.
madhan 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 debbc0a ATLAS-3067: fix for IT failures caused by changes in hive-preprocessor
debbc0a is described below
commit debbc0ae8c012482e1401ab5699acf448d0205e2
Author: Madhan Neethiraj <ma...@apache.org>
AuthorDate: Wed Mar 13 23:04:41 2019 -0700
ATLAS-3067: fix for IT failures caused by changes in hive-preprocessor
---
.../apache/atlas/notification/preprocessor/HivePreprocessor.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/webapp/src/main/java/org/apache/atlas/notification/preprocessor/HivePreprocessor.java b/webapp/src/main/java/org/apache/atlas/notification/preprocessor/HivePreprocessor.java
index 9d6ad22..0b93658 100644
--- a/webapp/src/main/java/org/apache/atlas/notification/preprocessor/HivePreprocessor.java
+++ b/webapp/src/main/java/org/apache/atlas/notification/preprocessor/HivePreprocessor.java
@@ -205,13 +205,17 @@ public class HivePreprocessor {
Object inputs = entity.getAttribute(ATTRIBUTE_INPUTS);
Object outputs = entity.getAttribute(ATTRIBUTE_OUTPUTS);
+ int inputsCount = (inputs instanceof Collection) ? ((Collection) inputs).size() : 0;
+ int outputsCount = (outputs instanceof Collection) ? ((Collection) outputs).size() : 0;
+
removeIgnoredObjectIds(inputs, context);
removeIgnoredObjectIds(outputs, context);
boolean isInputsEmpty = isEmpty(inputs);
boolean isOutputsEmpty = isEmpty(outputs);
- if (isInputsEmpty || isOutputsEmpty) {
+ // if inputs/outputs became empty due to removal of ignored entities, ignore the process entity as well
+ if ((inputsCount > 0 && isInputsEmpty) || (outputsCount > 0 && isOutputsEmpty)) {
context.addToIgnoredEntities(entity);
// since the process entity is ignored, entities referenced by inputs/outputs of this process entity