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 72178632ba..ede15a6dc3 100644 --- a/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java +++ b/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java @@ -692,7 +692,7 @@ else if (!isInput && ! isInVertexVisited) private void setHasDownstream(AtlasLineageOnDemandContext atlasLineageOnDemandContext, AtlasVertex inVertex, LineageInfoOnDemand inLineageInfo) { String lineageType = RequestContext.get().getLineageType(); - List filteredEdges = getFilteredAtlasEdges(inVertex, IN, LINEAGE_MAP.get(lineageType)[0], atlasLineageOnDemandContext, false); + List filteredEdges = getFilteredAtlasEdges(inVertex, IN, LINEAGE_MAP.get(lineageType)[0], atlasLineageOnDemandContext); if (!filteredEdges.isEmpty()) { inLineageInfo.setHasDownstream(true); inLineageInfo.setTotalOutputRelationsCount(filteredEdges.size()); @@ -701,20 +701,19 @@ private void setHasDownstream(AtlasLineageOnDemandContext atlasLineageOnDemandCo private void setHasUpstream(AtlasLineageOnDemandContext atlasLineageOnDemandContext, AtlasVertex outVertex, LineageInfoOnDemand outLineageInfo) { String lineageType = RequestContext.get().getLineageType(); - List filteredEdges = getFilteredAtlasEdges(outVertex, IN, LINEAGE_MAP.get(lineageType)[1], atlasLineageOnDemandContext, false); + List filteredEdges = getFilteredAtlasEdges(outVertex, IN, LINEAGE_MAP.get(lineageType)[1], 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;