From d793a9346a414b4ad444cfa4237771fe4e3e44d1 Mon Sep 17 00:00:00 2001 From: akshaysw Date: Tue, 23 Jul 2024 22:44:24 +0530 Subject: [PATCH] [remove] isHasAny flag --- .../org/apache/atlas/discovery/EntityLineageService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java b/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java index f3fc72e4e7..dfd74ea896 100644 --- a/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java +++ b/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java @@ -629,7 +629,7 @@ else if (!isInput && ! isInVertexVisited) } private void setHasDownstream(AtlasLineageOnDemandContext atlasLineageOnDemandContext, AtlasVertex inVertex, LineageInfoOnDemand inLineageInfo) { - List filteredEdges = getFilteredAtlasEdges(inVertex, IN, PROCESS_INPUTS_EDGE, atlasLineageOnDemandContext, false); + List filteredEdges = getFilteredAtlasEdges(inVertex, IN, PROCESS_INPUTS_EDGE, atlasLineageOnDemandContext); if (!filteredEdges.isEmpty()) { inLineageInfo.setHasDownstream(true); inLineageInfo.setTotalOutputRelationsCount(filteredEdges.size()); @@ -637,20 +637,19 @@ private void setHasDownstream(AtlasLineageOnDemandContext atlasLineageOnDemandCo } private void setHasUpstream(AtlasLineageOnDemandContext atlasLineageOnDemandContext, AtlasVertex outVertex, LineageInfoOnDemand outLineageInfo) { - List filteredEdges = getFilteredAtlasEdges(outVertex, IN, PROCESS_OUTPUTS_EDGE, atlasLineageOnDemandContext, false); + List filteredEdges = getFilteredAtlasEdges(outVertex, IN, PROCESS_OUTPUTS_EDGE, atlasLineageOnDemandContext); if (!filteredEdges.isEmpty()) { outLineageInfo.setHasUpstream(true); outLineageInfo.setTotalInputRelationsCount(filteredEdges.size()); } } - private List getFilteredAtlasEdges(AtlasVertex outVertex, AtlasEdgeDirection direction, String processEdgeLabel, AtlasLineageOnDemandContext atlasLineageOnDemandContext, boolean hasAnyCheck) { + private List getFilteredAtlasEdges(AtlasVertex outVertex, AtlasEdgeDirection direction, String processEdgeLabel, AtlasLineageOnDemandContext atlasLineageOnDemandContext) { List filteredEdges = new ArrayList<>(); Iterable edges = outVertex.getEdges(direction, processEdgeLabel); for (AtlasEdge edge : edges) { if (edgeMatchesEvaluation(edge, atlasLineageOnDemandContext)) { filteredEdges.add(edge); - if (hasAnyCheck) break; } } return filteredEdges;