This is an automated email from the ASF dual-hosted git repository.

radhikakundam pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 2d62af932 ATLAS-4734: HiveProcess - Output entity creation is ignored 
in case of same entity exists both inputs and outputs from context
2d62af932 is described below

commit 2d62af9326eab0312e0a6fac8ef388b1f4d0f498
Author: radhikakundam <radhikakun...@apache.org>
AuthorDate: Mon Mar 13 16:05:09 2023 -0700

    ATLAS-4734: HiveProcess - Output entity creation is ignored in case of same 
entity exists both inputs and outputs from context
    
    (cherry picked from commit 013c8623e919b9442b440df9a605be343632dc2b)
---
 .../org/apache/atlas/hive/hook/events/CreateHiveProcess.java  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git 
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateHiveProcess.java
 
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateHiveProcess.java
index 5787c9365..bc2c91a25 100644
--- 
a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateHiveProcess.java
+++ 
b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateHiveProcess.java
@@ -70,9 +70,10 @@ public class CreateHiveProcess extends BaseHiveEvent {
         AtlasEntitiesWithExtInfo ret = null;
 
         if (!skipProcess()) {
-            List<AtlasEntity> inputs         = new ArrayList<>();
-            List<AtlasEntity> outputs        = new ArrayList<>();
-            Set<String>       processedNames = new HashSet<>();
+            List<AtlasEntity> inputs              = new ArrayList<>();
+            List<AtlasEntity> outputs             = new ArrayList<>();
+            Set<String>       processedInputNames = new HashSet<>();
+            Set<String>       processedOutputNames = new HashSet<>();
 
             ret = new AtlasEntitiesWithExtInfo();
 
@@ -80,7 +81,7 @@ public class CreateHiveProcess extends BaseHiveEvent {
                 for (ReadEntity input : getInputs()) {
                     String qualifiedName = getQualifiedName(input);
 
-                    if (qualifiedName == null || 
!processedNames.add(qualifiedName)) {
+                    if (qualifiedName == null || 
!processedInputNames.add(qualifiedName)) {
                         continue;
                     }
 
@@ -100,7 +101,7 @@ public class CreateHiveProcess extends BaseHiveEvent {
                 for (WriteEntity output : getOutputs()) {
                     String qualifiedName = getQualifiedName(output);
 
-                    if (qualifiedName == null || 
!processedNames.add(qualifiedName)) {
+                    if (qualifiedName == null || 
!processedOutputNames.add(qualifiedName)) {
                         continue;
                     }
 

Reply via email to