Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DG-1720 Support Product lineage with current lineage APIs #3404

Merged
merged 6 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public class LineageListRequest {
private Boolean excludeMeanings;
private Boolean excludeClassifications;


private String lineageType = "DatasetProcessLineage";

public enum LineageDirection {INPUT, OUTPUT}

public LineageListRequest() {
Expand Down Expand Up @@ -81,6 +84,13 @@ public Integer getDepth() {
public void setDepth(Integer depth) {
this.depth = depth;
}
public String getLineageType() {
return lineageType;
}

public void setLineageType(String lineageType) {
this.lineageType = lineageType;
}

public LineageDirection getDirection() {
return direction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class LineageOnDemandRequest {
private Set<String> attributes;
private Set<String> relationAttributes;
private LineageOnDemandBaseParams defaultParams;
private String lineageType = "DatasetProcessLineage";

public LineageOnDemandRequest() {
this.attributes = new HashSet<>();
Expand Down Expand Up @@ -64,6 +65,13 @@ public void setRelationshipTraversalFilters(SearchParameters.FilterCriteria rela
this.relationshipTraversalFilters = relationshipTraversalFilters;
}

public String getLineageType() {
return lineageType;
}

public void setLineageType(String lineageType) {
this.lineageType = lineageType;
}
public Set<String> getAttributes() {
return attributes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public final class AtlasLineageListContext {
private int currentEntityCounter;
private boolean depthLimitReached;
private boolean hasMoreUpdated;
private String lineageType = "DatasetProcessLineage";

public AtlasLineageListContext(LineageListRequest lineageListRequest, AtlasTypeRegistry typeRegistry) {
this.guid = lineageListRequest.getGuid();
Expand All @@ -34,6 +35,7 @@ public AtlasLineageListContext(LineageListRequest lineageListRequest, AtlasTypeR
this.vertexTraversalPredicate = constructInMemoryPredicate(typeRegistry, lineageListRequest.getEntityTraversalFilters());
this.edgeTraversalPredicate = constructInMemoryPredicate(typeRegistry, lineageListRequest.getRelationshipTraversalFilters());
this.attributes = lineageListRequest.getAttributes();
this.lineageType = lineageListRequest.getLineageType();
this.relationAttributes = lineageListRequest.getRelationAttributes();
}

Expand Down Expand Up @@ -129,6 +131,14 @@ public void setCurrentFromCounter(int currentFromCounter) {
this.currentFromCounter = currentFromCounter;
}

public String getLineageType() {
return lineageType;
}

public void setLineageType(String lineageType) {
this.lineageType = lineageType;
}

public int getCurrentEntityCounter() {
return currentEntityCounter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ public class AtlasLineageOnDemandContext {
private Set<String> relationAttributes;
private LineageOnDemandBaseParams defaultParams;


private String lineageType = "DatasetProcessLineage";

public AtlasLineageOnDemandContext(LineageOnDemandRequest lineageOnDemandRequest, AtlasTypeRegistry typeRegistry) {
this.constraints = lineageOnDemandRequest.getConstraints();
this.attributes = lineageOnDemandRequest.getAttributes();
this.relationAttributes = lineageOnDemandRequest.getRelationAttributes();
this.defaultParams = lineageOnDemandRequest.getDefaultParams();
this.vertexPredicate = constructInMemoryPredicate(typeRegistry, lineageOnDemandRequest.getEntityTraversalFilters());
this.edgePredicate = constructInMemoryPredicate(typeRegistry, lineageOnDemandRequest.getRelationshipTraversalFilters());
this.lineageType = lineageOnDemandRequest.getLineageType();
}

public Map<String, LineageOnDemandConstraints> getConstraints() {
Expand All @@ -56,6 +60,13 @@ public Predicate getEdgePredicate() {
public void setEdgePredicate(Predicate edgePredicate) {
this.edgePredicate = edgePredicate;
}
public String getLineageType() {
return lineageType;
}

public void setLineageType(String lineageType) {
this.lineageType = lineageType;
}

public Set<String> getAttributes() {
return attributes;
Expand Down
Loading
Loading