Skip to content

Commit

Permalink
Merge pull request #2473 from GuyAckermans/auditlog
Browse files Browse the repository at this point in the history
Open lineage Services: Refine Auditlog
  • Loading branch information
GuyAckermans authored Jan 22, 2020
2 parents 80dba8e + d1cce12 commit cd77b7f
Show file tree
Hide file tree
Showing 7 changed files with 188 additions and 170 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
package org.odpi.openmetadata.governanceservers.openlineage.buffergraph;

import org.odpi.openmetadata.accessservices.assetlineage.event.LineageEvent;
import org.odpi.openmetadata.accessservices.assetlineage.model.GraphContext;
import org.odpi.openmetadata.accessservices.assetlineage.model.LineageEntity;
import org.odpi.openmetadata.governanceservers.openlineage.OpenLineageGraph;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException;
import org.odpi.openmetadata.governanceservers.openlineage.ffdc.OpenLineageException;

import java.util.Set;

public interface BufferGraph extends OpenLineageGraph {
public interface BufferGraph{

/**
* Stores
Expand All @@ -19,6 +16,11 @@ public interface BufferGraph extends OpenLineageGraph {
*/
void addEntity(LineageEvent lineageEvent);

/**
* Registers the connector as active
*/
void start() throws ConnectorCheckedException;

void initializeGraphDB() throws OpenLineageException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/**
* The ODF error code is used to define first failure data capture (FFDC) for errors that occur when working with
* ODF Discovery Services. It is used in conjunction with all ODF Exceptions, both Checked and Runtime (unchecked).
* Open Lineage Services. It is used in conjunction with all ODF Exceptions, both Checked and Runtime (unchecked).
* <p>
* The 5 fields in the enum are:
* <ul>
Expand Down Expand Up @@ -75,20 +75,37 @@ public enum OpenLineageServerErrorCode {
OPEN_LINEAGE_HANDLER_NOT_INSTANTIATED(500, "OPEN-LINEAGE-SERVER-500-002",
"The OpenLineageHandler {0} has not been instantiated in the open lineage server {1}",
"The OpenLineageHandler has not been instantiated in the open lineage server.",
"This may be a configuration or a code error. Look for other error messages and review the code of " +
"the open lineage server. Once the cause is resolved, retry the open lineage request."),
"the open lineage server. Once the cause is resolved, retry the open lineage request."),

CANNOT_OPEN_GRAPH_DB(400, "OPEN-LINEAGE-SERVICES-001",
"It is not possible to open the graph database at path {0} in the {1} method of {2} class.",
"Graph could not be opened due to invalid configuration",
"The system was unable to open the graph repository graph database. " +
"Please check that the graph database exists and is not in use by another process."),

NO_IN_TOPIC_CONNECTOR(400, "OPEN-LINEAGE-SERVICES-002",
"Error retrieving inTopic Connector",
"IError retrieving inTopic Connector",
"The system was unable to obtain a connector for the eventbus. " +
"Please verify the topic specifications in the configuration."),
"Please check that the graph database exists and is not in use by another process."),

ERROR_INITIALIZING_BUFFER_GRAPH_CONNECTOR(400, "OPEN-LINEAGE-SERVICES-001",
"The Open Lineage server {0} is not able to initialize the Buffergraph database connector with the values provided in configuration {1}",
"The Buffergraph database connector could not be initialized",
"Please check that the Buffergraph database exists and is not in use by another process, and verify the Open Lineage Services configuration"),

ERROR_INITIALIZING_MAIN_GRAPH_CONNECTOR(400, "OPEN-LINEAGE-SERVICES-001",
"The Open Lineage server {0} is not able to initialize the Maingraph database connector with the values provided in configuration {1}",
"The Maingraph database connector could not be initialized",
"Please check that the Maingraph database exists and is not in use by another process, and verify the Open Lineage Services configuration"),

ERROR_STARTING_BUFFER_GRAPH_CONNECTOR(400, "OPEN-LINEAGE-SERVICES-001",
"The Open Lineage server {0} is not able to register the Buffergraph database connector as \"active\" with the values provided in configuration {1}",
"The Buffergraph database connector could not be started",
"Please check that the Buffergraph database exists and is not in use by another process, and verify the Open Lineage Services configuration"),

ERROR_STARTING_MAIN_GRAPH_CONNECTOR(400, "OPEN-LINEAGE-SERVICES-001",
"The Open Lineage server {0} is not able to register the Maingraph database connector as \"active\" with the values provided in configuration {1}",
"The Maingraph database connector could not be started",
"Please check that the Maingraph database exists and is not in use by another process, and verify the Open Lineage Services configuration"),

ERROR_OBTAINING_IN_TOPIC_CONNECTOR(400, "OPEN-LINEAGE-SERVICES-002",
"The Open Lineage Services server {0} was unable to obtain an in topic connector with the provided configuration {1}.",
"The in topic connector could not be obtained.",
"Review the topic name set by the Open Lineage Services configuration"),

NODE_NOT_FOUND(404, "OPEN-LINEAGE-SERVICES-001",
"Error retrieving queried node",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.governanceservers.openlineage.maingraph;

import org.odpi.openmetadata.governanceservers.openlineage.OpenLineageGraph;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException;
import org.odpi.openmetadata.governanceservers.openlineage.ffdc.OpenLineageException;
import org.odpi.openmetadata.governanceservers.openlineage.model.Scope;
import org.odpi.openmetadata.governanceservers.openlineage.responses.LineageResponse;

public interface MainGraph extends OpenLineageGraph {
public interface MainGraph{

/**
* Returns a lineage subgraph.
Expand All @@ -26,6 +27,11 @@ public interface MainGraph extends OpenLineageGraph {
//TODO Remove before pentest or production
void dumpMainGraph() throws OpenLineageException;

/**
* Registers the connector as active
*/
void start() throws ConnectorCheckedException;

/**
* Initialize the mainGraph database.
*/
Expand Down
Loading

0 comments on commit cd77b7f

Please sign in to comment.