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

Review Data Engine OMAS documentation #7718

Merged
merged 5 commits into from
Jun 20, 2023
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 @@ -13,7 +13,9 @@

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* The processing state event of Data Engine OMAS.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
Expand All @@ -36,7 +38,6 @@ public class ProcessingStateEvent extends DataEngineEventHeader {

/**
* The processing state.
*
* -- GETTER --
* Return the processing state
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
/**
* Definitions of the different types of events that the Data Engine OMAS can consume.
*/
package org.odpi.openmetadata.accessservices.dataengine.event;
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,35 @@
*/
@ToString
public enum DataEngineAuditCode {
/**
* OMAS-DATA-ENGINE-0001 The Data Engine Open Metadata Access Service (OMAS) is initializing a new server instance
*/
SERVICE_INITIALIZING("OMAS-DATA-ENGINE-0001",
OMRSAuditLogRecordSeverity.STARTUP,
"The Data Engine Open Metadata Access Service (OMAS) is initializing a new server instance",
"The local server has started up a new instance of the Data Engine OMAS.",
Constants.NO_ACTION_IS_REQUIRED),

/**
* OMAS-DATA-ENGINE-0002 The Data Engine Open Metadata Access Service (OMAS) has initialized a new instance for server
*/
SERVICE_INITIALIZED("OMAS-DATA-ENGINE-0002",
OMRSAuditLogRecordSeverity.STARTUP,
"The Data Engine Open Metadata Access Service (OMAS) has initialized a new instance for server {0}",
"The Data Engine OMAS has completed initialization of a new instance.",
Constants.NO_ACTION_IS_REQUIRED),

/**
* OMAS-DATA-ENGINE-0003 The Data Engine Open Metadata Access Service (OMAS) is shutting down its instance for server
*/
SERVICE_SHUTDOWN("OMAS-DATA-ENGINE-0003",
OMRSAuditLogRecordSeverity.SHUTDOWN,
"The Data Engine Open Metadata Access Service (OMAS) is shutting down its instance for server {0}",
"The local server has requested shut down of an Data Engine OMAS instance.",
Constants.NO_ACTION_IS_REQUIRED),

/**
* OMAS-DATA-ENGINE-0004 The Data Engine Open Metadata Access Service (OMAS) is unable to initialize a new instance
*/
SERVICE_INSTANCE_FAILURE("OMAS-DATA-ENGINE-0004",
OMRSAuditLogRecordSeverity.EXCEPTION,
"The Data Engine Open Metadata Access Service (OMAS) is unable to initialize a new instance; error " +
Expand All @@ -48,6 +59,9 @@ public enum DataEngineAuditCode {
"Its services are not available for the server.",
"Review the error message and any other reported failures to determine the cause of the problem. " +
" Once this is resolved, restart the server."),
/**
* OMAS-DATA-ENGINE-0005 The Data Engine Open Metadata Access Service (OMAS) is unable to initialize a new instance
*/
ERROR_INITIALIZING_TOPIC_CONNECTION("OMAS-DATA-ENGINE-0005",
OMRSAuditLogRecordSeverity.EXCEPTION,
"The Data Engine Open Metadata Access Service (OMAS) is unable to initialize a new instance; error " +
Expand All @@ -56,18 +70,27 @@ public enum DataEngineAuditCode {
"Its services are not available for the server.",
"Review the error message and any other reported failures to determine the cause of the problem. " +
" Once this is resolved, restart the server."),
/**
* OMAS-DATA-ENGINE-0006 The Data Engine Open Metadata Access Service (OMAS) is unable to process an event on its in topic
*/
PROCESS_EVENT_EXCEPTION("OMAS- DATA-ENGINE-0006",
OMRSAuditLogRecordSeverity.EXCEPTION,
"The Data Engine Open Metadata Access Service (OMAS) is unable to process an event on its in topic {0}; exception {1} returned " +
"error message: {2}",
"The access service detected an error during the start up of the out topic. Its services are not available for the server.",
"Review the error message and any other reported failures to determine the cause of the problem. Check the status of the event " +
"bus. Once this is resolved, restart the server."),
/**
* OMAS-DATA-ENGINE-0007 The Data Engine Open Metadata Access Service (OMAS) is unable to parse an event
*/
PARSE_EVENT_EXCEPTION("OMAS- DATA-ENGINE-0007",
OMRSAuditLogRecordSeverity.EXCEPTION,
"The data engine event {0} could not be parsed. Error: {1}",
"The system is unable to process the event.",
"Verify the topic configuration or the event schema."),
/**
* OMAS-DATA-ENGINE-0008 The Data Engine Open Metadata Access Service (OMAS) client has sent an event
*/
IN_TOPIC_EVENT_SENT("OMAS-DATA-ENGINE-0008",
OMRSAuditLogRecordSeverity.EVENT,
"The Data Engine Open Metadata Access Service (OMAS) client has sent event of type: {0}",
Expand All @@ -78,6 +101,7 @@ public enum DataEngineAuditCode {
* A message definition object for logging
* -- GETTER --
* Retrieves a message definition object for logging. This method is used when there are no message inserts.
*
* @return message definition object
*/
@Getter
Expand Down Expand Up @@ -106,7 +130,6 @@ public enum DataEngineAuditCode {
* Retrieve a message definition object for logging. This method is used when there are values to be inserted into the message.
*
* @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text.
*
* @return message definition object.
*/
public AuditLogMessageDefinition getMessageDefinition(String... params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,64 +28,79 @@

public enum DataEngineErrorCode implements ExceptionMessageSet {

/**
* OMAS-DATA-ENGINE-404-001 The open metadata repository services are not initialized for server {0}
*/
OMRS_NOT_INITIALIZED(404, "OMAS-DATA-ENGINE-404-001 ",
"The open metadata repository services are not initialized for server {0}",
"The system is unable to connect to the open metadata property server.",
"Check that the server initialized correctly. " +
"Correct any errors discovered and retry the request when the open metadata services are available."),
INVALID_PORT_TYPE(400, "OMAS-DATA-ENGINE-400-001",
"The port type passed for the entity with qualifiedName {0} is invalid, or different from expected type {1}",
"The system is unable to create a new PortDelegation relation without equal types between the ports.",
"Correct the code in the caller to provide the correct port type."),
PROCESS_EVENT_EXCEPTION(400, "OMAS-DATA-ENGINE-400-002",
"The data engine event {0} could not be processed. Error: {1}",
"The system is unable to process the event.",
"Verify the topic configuration or the event schema."),
DATA_ENGINE_EXCEPTION(400, "OMAS-DATA-ENGINE-400-004",
"Exception while processing the data engine event {0}",
"The system is unable to process the event.",
"Verify the topic configuration or the event schema."),
REFERENCEABLE_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-005",
/**
* OMAS-DATA-ENGINE-400-001 Referenceable with qualifiedName {0} was not found
*/
REFERENCEABLE_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-001",
"Referenceable with qualifiedName {0} was not found",
"The system is unable to create a new DataFlow relation.",
"Correct the code in the caller to provide the correct referenceable qualified name."),
PORT_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-006",
"Port with qualifiedName {0} was not found",
"The system is unable to create a new PortDelegation relation.",
"Correct the code in the caller to provide the correct port qualified name."),
NULL_TOPIC_CONNECTOR(400, "OMAS-DATA-ENGINE-400-007",
/**
* OMAS-DATA-ENGINE-400-002 Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize
*/
NULL_TOPIC_CONNECTOR(400, "OMAS-DATA-ENGINE-400-002",
"Unable to send or receive events for source {0} because the connector to the OMRS Topic failed to initialize",
"The local server will not connect to the cohort.",
"The connection to the connector is configured in the server configuration. " +
"Review previous error messages to determine the precise error in the " +
"start up configuration. " +
"Correct the configuration and reconnect the server to the cohort. "),
PROCESS_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-008",
/**
* OMAS-DATA-ENGINE-400-003 Process with qualifiedName {0} was not found
*/
PROCESS_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-003",
"Process with qualifiedName {0} was not found",
"The system is unable to create a new ProcessHierarchy relation.",
"Correct the code in the caller to provide the correct port qualified name."),
DATABASE_SCHEMA_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-009",
/**
* OMAS-DATA-ENGINE-400-004 Database Schema with qualifiedName {0} was not found
*/
DATABASE_SCHEMA_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-004",
"Database Schema with qualifiedName {0} was not found",
"The system is unable to create a new table attached to a database schema",
"Correct the code in the caller to provide the correct database schema qualified name."),
/**
* OMAS-DATA-ENGINE-500-001 An unexpected exception occurred when sending an event through connector {0} to the Data Engine OMAS out topic
*/
UNABLE_TO_SEND_EVENT(500, "OMAS-DATA-ENGINE-500-001",
"An unexpected exception occurred when sending an event through connector {0} to the Data Engine OMAS out topic. The failing " +
"event was {1}, the exception was {2} with message {2}",
"The system has issued a call to an open metadata access service input topic using event message broker",
"Look for errors in the remote server's audit log and console to understand and correct the source of the error."),
ENTITY_NOT_DELETED(400, "OMAS-DATA-ENGINE-400-010",
/**
* OMAS-DATA-ENGINE-400-005 Entity with qualifiedName {0} was not deleted
*/
ENTITY_NOT_DELETED(400, "OMAS-DATA-ENGINE-400-005",
"Entity with qualifiedName {0} was not deleted",
"The system is unable to delete the entity with the provided qualifiedName or guid.",
"Correct the code in the caller to provide the correct database qualified name."),

/**
* OMAS-DATA-ENGINE-500-002 Method {0} is not implemented
*/
METHOD_NOT_IMPLEMENTED(501, "OMAS-DATA-ENGINE-500-002",
"Method {0} is not implemented",
"The system performs no action as the method is not implemented.",
"No action suggested."),
TOPIC_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-011",
/**
* OMAS-DATA-ENGINE-400-006 Topic with qualifiedName {0} was not found
*/
TOPIC_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-006",
"Topic with qualifiedName {0} was not found",
"The system is unable to create a new event type attached to a topic",
"Correct the code in the caller to provide the correct topic qualified name."),
ENGINE_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-012",
/**
* OMAS-DATA-ENGINE-400-007 Engine with qualifiedName {0} was not found
*/
ENGINE_NOT_FOUND(400, "OMAS-DATA-ENGINE-400-007",
"Engine with qualifiedName {0} was not found",
"The system is unable to find the searched Engine",
"Correct the code in the caller to provide the correct Engine qualified name.");
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
/**
* This package provides the first failure data capture support for the Data Engine OMAS module.
* This includes an error code enum and an audit code enum.
*/
package org.odpi.openmetadata.accessservices.dataengine.ffdc;

/*
This package provides the first failure data capture support for the Data Engine OMAS module.
This includes an error code enum, a base class for runtime exceptions, a base class for checked exceptions plus
implementation of each specific exception.
This includes an error code enum and an audit code enum.

The error code enum (DataEngineErrorCode) has an entry for each unique situation
where an exception is returned. Each entry defines:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* Asset is a java bean used to create assets associated with the external data engine.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* The type Attribute.
* Attribute is a java bean used to create schema attributes associated with the external data engine.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* OM type CSVFile
* CSVFile is a java bean used to create CSVFiles associated with the external data engine.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* Collection is a java bean used to create collections associated with the external data engine.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
Expand All @@ -22,15 +25,13 @@
@Setter
@EqualsAndHashCode(callSuper = true)
@ToString
/**
* The collection entity is a group of related items.
*/
public class Collection extends Referenceable {

/**
* The name of the collection
* -- GETTER --
* Return the name of the collection.
*
* @return name string name
* -- SETTER --
* Set up the name of the collection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* Connection is a java bean used to create connections associated with the external data engine.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* ConnectorType is a java bean used to create connector types associated with the external data engine.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* OM type DataFile
* DataFile is a java bean used to create DataFiles associated with the external data engine.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "fileType")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "fileType")
@JsonSubTypes({ @JsonSubTypes.Type(value = DataFile.class, name = "DataFile"),
@JsonSubTypes.Type(value = CSVFile.class, name = "CSVFile")})
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;

/**
* The type DataFlow
* DataFlow is a java bean used to create data flow relationships.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
Expand Down
Loading