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

DE Proxy - use ProcessingState classification for saving sync time in DS connector #7009

Merged
merged 13 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from 12 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 @@ -43,7 +43,8 @@
@JsonSubTypes.Type(value = RelationalTableEvent.class, name = "RelationalTableEvent"),
@JsonSubTypes.Type(value = DataFileEvent.class, name = "DataFileEvent"),
@JsonSubTypes.Type(value = TopicEvent.class, name = "TopicEvent"),
@JsonSubTypes.Type(value = EventTypeEvent.class, name = "EventTypeEvent")
@JsonSubTypes.Type(value = EventTypeEvent.class, name = "EventTypeEvent"),
@JsonSubTypes.Type(value = ProcessingStateEvent.class, name = "ProcessingStateEvent")
})
@Getter
@Setter
Expand All @@ -53,15 +54,15 @@
public abstract class DataEngineEventHeader implements Serializable {

/**
* Event version ID
* Serial version UID
* -- GETTER --
* Gets the event version ID
* @return the event version ID
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the event version ID
* @param eventVersionId the event version ID
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private long eventVersionId = 1L;
private static final long serialVersionUID = 1L;

/* different data engine event types */
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,31 @@ public enum DataEngineEventType implements Serializable {
DATA_ENGINE_REGISTRATION_EVENT (1, "DataEngineRegistrationEvent", "An event that register a data engine as external source."),
LINEAGE_MAPPINGS_EVENT (2, "LineageMappingsEvent", "An event that add or update lineage mappings."),
PORT_ALIAS_EVENT (3, "PortAliasEvent", "An event that add or update port alias"),
PORT_IMPLEMENTATION_EVENT (4, "PortImplementationEvent", "An event that create or update port implementations."),
SCHEMA_TYPE_EVENT (5, "SchemaTypeEvent", "An event that create or update schema types."),
PORT_IMPLEMENTATION_EVENT (4, "PortImplementationEvent", "An event that creates or updates port implementations."),
SCHEMA_TYPE_EVENT (5, "SchemaTypeEvent", "An event that creates or updates schema types."),
PROCESS_HIERARCHY_EVENT (6, "ProcessHierarchyEvent", "An event to setup a process hierarchy."),
DELETE_DATA_ENGINE_EVENT (7, "DeleteDataEngineEvent", "An event that deletes an external data engine."),
DELETE_SCHEMA_TYPE_EVENT (8, "DeleteSchemaTypeEvent", "An event that deletes a schema type."),
DELETE_PORT_IMPLEMENTATION_EVENT (9, "DeletePortImplementationEvent", "An event that deletes a port implementation."),
DELETE_PORT_ALIAS_EVENT (10, "DeletePortAliasesEvent", "An event that deletes a port alias."),
DATABASE_EVENT (11, "DatabaseEvent", "An event that create or update databases."),
DATABASE_SCHEMA_EVENT (12, "DatabaseSchemaEvent", "An event that create or update database schemas."),
RELATIONAL_TABLE_EVENT (13, "RelationalTableEvent", "An event that create or update relational tables."),
DATA_FILE_EVENT (14, "DataFileEvent", "An event that create or update data files."),
DATABASE_EVENT (11, "DatabaseEvent", "An event that creates or updates databases."),
DATABASE_SCHEMA_EVENT (12, "DatabaseSchemaEvent", "An event that creates or updates database schemas."),
RELATIONAL_TABLE_EVENT (13, "RelationalTableEvent", "An event that creates or updates relational tables."),
DATA_FILE_EVENT (14, "DataFileEvent", "An event that creates or updates data files."),
DELETE_DATABASE_EVENT (15, "DeleteDatabaseEvent", "An event that deletes a database."),
DELETE_DATABASE_SCHEMA_EVENT (16, "DeleteDatabaseSchemaEvent", "An event that deletes a database schema."),
DELETE_RELATIONAL_TABLE_EVENT (17, "DeleteRelationalTableEvent", "An event that deletes a relational table."),
DELETE_DATA_FILE_EVENT (18, "DeleteDataFileEvent", "An event that deletes a data file."),
DELETE_FOLDER_EVENT (19, "DeleteFolderEvent", "An event that deletes a folder."),
DELETE_CONNECTION_EVENT (20, "DeleteConnectionEvent", "An event that deletes a connection."),
DELETE_ENDPOINT_EVENT (21, "DeleteEndpointEvent", "An event that deletes an endpoint."),
PROCESS_EVENT (22, "ProcessEvent", "An event that create or update a process."),
PROCESS_EVENT (22, "ProcessEvent", "An event that creates or updates a process."),
DELETE_PROCESS_EVENT (23, "DeleteProcessEvent", "An event that deletes a process."),
TOPIC_EVENT (24, "TopicEvent", "An event that create or update topics."),
EVENT_TYPE_EVENT (25, "EventTypeEvent", "An event that create or update event types."),
TOPIC_EVENT (24, "TopicEvent", "An event that creates or updates topics."),
EVENT_TYPE_EVENT (25, "EventTypeEvent", "An event that creates or updates event types."),
DELETE_TOPIC_EVENT (26, "DeleteTopicEvent", "An event that deletes a topic."),
DELETE_EVENT_TYPE_EVENT (27, "DeleteEventTypeEvent", "An event that deletes an event type.");
DELETE_EVENT_TYPE_EVENT (27, "DeleteEventTypeEvent", "An event that deletes an event type."),
PROCESSING_STATE_TYPE_EVENT (28, "ProcessingStateEvent", "An event that creates or updates the processing state classification of an engine.");

@Getter(AccessLevel.NONE)
@Setter(AccessLevel.NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.odpi.openmetadata.accessservices.dataengine.model.SoftwareServerCapability;
import org.odpi.openmetadata.accessservices.dataengine.model.Engine;

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

/**
* The Data engine registration event for registering external source as software server capability.
* The Data engine registration event for registering external source as engine.
*/
@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
Expand All @@ -27,14 +27,25 @@
public class DataEngineRegistrationEvent extends DataEngineEventHeader {

/**
* Software server capability
* Serial version UID
* -- GETTER --
* Gets the software server capability
* @return the software server capability
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the software server capability
* @param softwareServerCapability the software server capability
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private SoftwareServerCapability softwareServerCapability;
private static final long serialVersionUID = 1L;

/**
* Engine
* -- GETTER --
* Gets the engine
* @return the engine
* -- SETTER --
* Sets the engine
* @param engine the engine
*/
private Engine engine;

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
@EqualsAndHashCode(callSuper = true)
@ToString
public class DataFileEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The data file to be created
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@
@EqualsAndHashCode(callSuper = true)
@ToString
public class DatabaseEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;


/**
* The database to be created
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
@EqualsAndHashCode(callSuper = true)
@ToString
public class DatabaseSchemaEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The database schema to be created
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
@ToString
public class DeleteEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The qualified name of the entity
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
@EqualsAndHashCode(callSuper = true)
@ToString
public class EventTypeEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The event type to be created
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
@EqualsAndHashCode(callSuper = true)
@ToString
public class FindEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The find request body
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@
@ToString(callSuper = true)
public class LineageMappingsEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The lineage mappings
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
@ToString(callSuper = true)
public class PortAliasEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The process qualified name
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
@ToString(callSuper = true)
public class PortImplementationEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The process qualified name
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
@ToString(callSuper = true)
public class ProcessEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The process
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@
@Setter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProcessHierarchyEvent extends DataEngineEventHeader{
public class ProcessHierarchyEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The process hierarchy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@
@ToString(callSuper = true)
public class ProcessListEvent extends DataEngineEventHeader {

/**
* Serial version UID
* -- GETTER --
* Gets the serial version UID
* @return the serial version UID
* -- SETTER --
* Sets the serial version UID
* @param serialVersionUID the serial version UID
*/
private static final long serialVersionUID = 1L;

/**
* The failed GUIDs
* -- GETTER --
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.dataengine.event;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.odpi.openmetadata.accessservices.dataengine.model.ProcessingState;

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

@JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProcessingStateEvent extends DataEngineEventHeader {
alexandra-bucur marked this conversation as resolved.
Show resolved Hide resolved

/**
* Serial version ID
* -- GETTER --
* Gets the serial version ID
* @return the serial version ID
* -- SETTER --
* Sets the serial version ID
* @param serialVersionUID the serial version ID
*/
private long serialVersionUID = 1L;
alexandra-bucur marked this conversation as resolved.
Show resolved Hide resolved

/**
* The processing state.
*
* -- GETTER --
* Return the processing state
*
* @return processing state
* -- SETTER --
* Set up the processing state
* @param processingState processing state
*/
private ProcessingState processingState;
}
Loading