Class LineageGraphConnector
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.Connector
-
- org.odpi.openmetadata.frameworks.connectors.ConnectorBase
-
- org.odpi.openmetadata.governanceservers.openlineage.graph.LineageGraphConnectorBase
-
- org.odpi.openmetadata.openconnectors.governancedaemonconnectors.openlineageconnectors.janusconnector.graph.LineageGraphConnector
-
- All Implemented Interfaces:
LineageGraph,OpenLineageGraphConnector
public class LineageGraphConnector extends LineageGraphConnectorBase
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, securedProperties
-
-
Constructor Summary
Constructors Constructor Description LineageGraphConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)voiddeleteClassification(Set<GraphContext> classificationContext)Deletes a classification of a vertexvoiddeleteEntity(String guid, Object version)voiddeleteRelationship(String guid)voiddisconnect()booleanequals(Object o)Optional<Long>getAssetLineageUpdateTime()LineageVertexResponsegetEntityDetails(String guid)inthashCode()voidinitializeGraphDB(AuditLog auditLog)Instantiates the graph based on the configuration passed.booleanisEntityInGraph(String guid)LineageResponselineage(Scope scope, String guid, boolean includeProcesses)voidperformLineageGraphJob()voidsaveAssetLineageUpdateTime(Long lastUpdateTime)voidstoreToGraph(Set<GraphContext> graphContext)Creates vertices and the relationships between themvoidupdateClassification(Set<GraphContext> classificationContext)Updates the classification of a vertexvoidupdateEntity(LineageEntity lineageEntity)Updates the properties of a vertexvoidupdateNeighbours(String nodeGUID, Set<String> neighboursGUIDS)Updates the neighbours of a node by removing all the entities that no longer have a relationship with it.voidupdateRelationship(LineageRelationship lineageRelationship)Updates the properties of an edgevoidupsertRelationship(LineageRelationship lineageRelationship)Create or update the relationship between two edges In case the vertexes are not created, they are firstly created-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
getConnectedAssetProperties, getConnection, getConnectorInstanceId, initialize, initializeConnectedAssetProperties, isActive, start, toString
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.odpi.openmetadata.governanceservers.openlineage.OpenLineageGraphConnector
start
-
-
-
-
Field Detail
-
KV
public static final String KV
- See Also:
- Constant Field Values
-
CLOSE_LINEAGE_GRAPH_EXCEPTION
public static final String CLOSE_LINEAGE_GRAPH_EXCEPTION
- See Also:
- Constant Field Values
-
EXCEPTION_WHILE_CLOSING_LINEAGE_GRAPH_MESSAGE
public static final String EXCEPTION_WHILE_CLOSING_LINEAGE_GRAPH_MESSAGE
- See Also:
- Constant Field Values
-
CLOSE_LINEAGE_GRAPH_EXCEPTION_MESSAGE
public static final String CLOSE_LINEAGE_GRAPH_EXCEPTION_MESSAGE
- See Also:
- Constant Field Values
-
UNABLE_TO_ADD_PROPERTIES
public static final String UNABLE_TO_ADD_PROPERTIES
- See Also:
- Constant Field Values
-
AND_GUID
public static final String AND_GUID
- See Also:
- Constant Field Values
-
UNABLE_TO_CREATE_EDGE_WITH_LABEL
public static final String UNABLE_TO_CREATE_EDGE_WITH_LABEL
- See Also:
- Constant Field Values
-
FROM
public static final String FROM
- See Also:
- Constant Field Values
-
UNABLE_TO_CREATE_VERTEX_WITH_TYPE
public static final String UNABLE_TO_CREATE_VERTEX_WITH_TYPE
- See Also:
- Constant Field Values
-
ASSET_LINEAGE_VARIABLES
public static final String ASSET_LINEAGE_VARIABLES
- See Also:
- Constant Field Values
-
INPUT_PORT
public static final String INPUT_PORT
- See Also:
- Constant Field Values
-
OLS_HAS_CORRESPONDING_ELEMENTS
public static final String OLS_HAS_CORRESPONDING_ELEMENTS
- See Also:
- Constant Field Values
-
VERTICES_AND_RELATIONSHIP_CREATION_EXCEPTION
public static final String VERTICES_AND_RELATIONSHIP_CREATION_EXCEPTION
- See Also:
- Constant Field Values
-
COULD_NOT_DROP_EDGE
public static final String COULD_NOT_DROP_EDGE
- See Also:
- Constant Field Values
-
PROPERTIES
public static final String PROPERTIES
- See Also:
- Constant Field Values
-
V
public static final String V
- See Also:
- Constant Field Values
-
VERTEX_GUID_NOT_FOUND_WHEN_UPDATE
public static final String VERTEX_GUID_NOT_FOUND_WHEN_UPDATE
- See Also:
- Constant Field Values
-
PROPERTIES_UPDATE_EXCEPTION
public static final String PROPERTIES_UPDATE_EXCEPTION
- See Also:
- Constant Field Values
-
UNABLE_TO_ADD_PROPERTIES_ON_EDGE_FROM_RELATIONSHIP_WITH_TYPE
public static final String UNABLE_TO_ADD_PROPERTIES_ON_EDGE_FROM_RELATIONSHIP_WITH_TYPE
- See Also:
- Constant Field Values
-
EDGE_GUID_NOT_FOUND_WHEN_UPDATE
public static final String EDGE_GUID_NOT_FOUND_WHEN_UPDATE
- See Also:
- Constant Field Values
-
CLASSIFICATION_WITH_GUID_NOT_FOUND
public static final String CLASSIFICATION_WITH_GUID_NOT_FOUND
- See Also:
- Constant Field Values
-
S
public static final String S
- See Also:
- Constant Field Values
-
DELETE_CLASSIFICATION_EXCEPTION
public static final String DELETE_CLASSIFICATION_EXCEPTION
- See Also:
- Constant Field Values
-
VERTEX_WITH_GUID_IS_NOT_PRESENT
public static final String VERTEX_WITH_GUID_IS_NOT_PRESENT
- See Also:
- Constant Field Values
-
VERTEX_WITH_GUID_DELETED
public static final String VERTEX_WITH_GUID_DELETED
- See Also:
- Constant Field Values
-
EDGE_WITH_GUID_DID_NOT_DELETE
public static final String EDGE_WITH_GUID_DID_NOT_DELETE
- See Also:
- Constant Field Values
-
EDGE_WITH_GUID_DELETED
public static final String EDGE_WITH_GUID_DELETED
- See Also:
- Constant Field Values
-
EDGE
public static final String EDGE
- See Also:
- Constant Field Values
-
VERTEX_NOT_FOUND
public static final String VERTEX_NOT_FOUND
- See Also:
- Constant Field Values
-
THE_LINEAGE_GRAPH_COULD_NOT_BE_INITIALIZED_DUE_TO_AN_ERROR
public static final String THE_LINEAGE_GRAPH_COULD_NOT_BE_INITIALIZED_DUE_TO_AN_ERROR
- See Also:
- Constant Field Values
-
SOMETHING_WENT_WRONG_WHEN_TRYING_TO_MAP_A_PROCESS
public static final String SOMETHING_WENT_WRONG_WHEN_TRYING_TO_MAP_A_PROCESS
- See Also:
- Constant Field Values
-
SOMETHING_WENT_WRONG_WHEN_TRYING_TO_MAP_A_PROCESS_THE_ERROR_IS
public static final String SOMETHING_WENT_WRONG_WHEN_TRYING_TO_MAP_A_PROCESS_THE_ERROR_IS
- See Also:
- Constant Field Values
-
FAILED_TO_UPDATE_CLASSIFICATION_WITH_GUID
public static final String FAILED_TO_UPDATE_CLASSIFICATION_WITH_GUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
initializeGraphDB
public void initializeGraphDB(AuditLog auditLog) throws OpenLineageException
Instantiates the graph based on the configuration passed.- Throws:
OpenLineageException
-
disconnect
public void disconnect() throws ConnectorCheckedException- Specified by:
disconnectin interfaceOpenLineageGraphConnector- Overrides:
disconnectin classConnectorBase- Throws:
ConnectorCheckedException
-
performLineageGraphJob
public void performLineageGraphJob()
-
saveAssetLineageUpdateTime
public void saveAssetLineageUpdateTime(Long lastUpdateTime)
-
storeToGraph
public void storeToGraph(Set<GraphContext> graphContext)
Creates vertices and the relationships between them- Parameters:
graphContext- - graph Collection that contains vertices and edges to be stored
-
updateNeighbours
public void updateNeighbours(String nodeGUID, Set<String> neighboursGUIDS)
Updates the neighbours of a node by removing all the entities that no longer have a relationship with it.- Parameters:
nodeGUID- - the identifier of the entity that was updatedneighboursGUIDS- - the identifiers of the nodes that have a direct relationship to the entity
-
updateEntity
public void updateEntity(LineageEntity lineageEntity)
Updates the properties of a vertex- Parameters:
lineageEntity- - LineageEntity object that has the updated values
-
upsertRelationship
public void upsertRelationship(LineageRelationship lineageRelationship)
Create or update the relationship between two edges In case the vertexes are not created, they are firstly created- Parameters:
lineageRelationship- relationship to be updated or created
-
updateRelationship
public void updateRelationship(LineageRelationship lineageRelationship)
Updates the properties of an edge- Parameters:
lineageRelationship- - lineageRelationship object that has the updated values
-
updateClassification
public void updateClassification(Set<GraphContext> classificationContext)
Updates the classification of a vertex- Parameters:
classificationContext- - LineageEntity object that has the updated values
-
deleteClassification
public void deleteClassification(Set<GraphContext> classificationContext)
Deletes a classification of a vertex- Parameters:
classificationContext- - any remaining classifications, empty map if none
-
deleteRelationship
public void deleteRelationship(String guid)
-
lineage
public LineageResponse lineage(Scope scope, String guid, boolean includeProcesses)
-
getEntityDetails
public LineageVertexResponse getEntityDetails(String guid)
-
isEntityInGraph
public boolean isEntityInGraph(String guid)
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classConnectorBase
-
canEqual
protected boolean canEqual(Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classConnectorBase
-
-