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

Governance server improvements #7105

Merged
merged 5 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -382,15 +382,15 @@ public List<String> addDataFileToCatalogFromTemplate(String userId,
{
final String methodName = "addDataFileToCatalogFromTemplate";
final String propertiesParameterName = "templateProperties";
final String qualifiedNameParameterName = "templateProperties.qualifiedName";
final String pathNameParameterName = "pathName";

invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateObject(templateProperties, propertiesParameterName, methodName);

String pathName = this.getPathName(templateProperties.getPathName(),
templateProperties.getQualifiedName());

invalidParameterHandler.validateName(templateProperties.getQualifiedName(), qualifiedNameParameterName, methodName);
invalidParameterHandler.validateName(pathName, pathNameParameterName, methodName);

final String urlTemplate = serverPlatformURLRoot + urlTemplatePrefix + "/data-files/from-template/{2}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ public <T> B getNewSchemaAttributeBean(Class<B> beanClass,
{
if (repositoryHelper.isTypeOf(serviceName, relationship.getType().getTypeDefName(), OpenMetadataAPIMapper.FOREIGN_KEY_RELATIONSHIP_TYPE_NAME))
{
/*
* Foreign key properties are only set up in the column that contains the foreign key which is at end 2 of the relationship.
*/
if (schemaAttributeEntity.getGUID().equals(relationship.getEntityTwoProxy().getGUID()))
{
DatabaseForeignKeyProperties databaseForeignKeyProperties = new DatabaseForeignKeyProperties();
Expand All @@ -144,8 +147,12 @@ public <T> B getNewSchemaAttributeBean(Class<B> beanClass,
databaseForeignKeyProperties.setExtendedProperties(this.getRemainingExtendedProperties(relationshipProperties));

bean.setForeignKeyProperties(databaseForeignKeyProperties);
bean.setReferencedColumnGUID(relationship.getEntityTwoProxy().getGUID());
bean.setReferencedColumnQualifiedName(this.getQualifiedName(relationship.getEntityTwoProxy().getUniqueProperties()));

/*
* These values reference the column that is the primary key.
*/
bean.setReferencedColumnGUID(relationship.getEntityOneProxy().getGUID());
bean.setReferencedColumnQualifiedName(this.getQualifiedName(relationship.getEntityOneProxy().getUniqueProperties()));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ public GUIDListResponse addDataFileToCatalogFromTemplate(String ser
requestBody.getExternalSourceGUID(),
requestBody.getExternalSourceName(),
templateGUID,
requestBody.getQualifiedName(),
pathName,
requestBody.getDisplayName(),
requestBody.getVersionIdentifier(),
Expand Down Expand Up @@ -642,6 +643,7 @@ public GUIDListResponse addDataFolderAssetToCatalog(String server
requestBody.getExternalSourceGUID(),
requestBody.getExternalSourceName(),
requestBody.getQualifiedName(),
requestBody.getPathName(),
requestBody.getName(),
requestBody.getVersionIdentifier(),
requestBody.getDescription(),
Expand Down Expand Up @@ -723,6 +725,7 @@ public GUIDListResponse addDataFolderToCatalogFromTemplate(String s
requestBody.getExternalSourceName(),
templateGUID,
requestBody.getQualifiedName(),
requestBody.getPathName(),
requestBody.getDisplayName(),
requestBody.getVersionIdentifier(),
requestBody.getDescription(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
# Kafka Open Metadata Topic Connector

The Kafka Open Metadata Topic Connector implements
an [Apache Kafka](https://kafka.apache.org/) connector for a topic that exchanges
an [Apache Kafka](https://kafka.apache.org/) open metadata topic connector for a topic that exchanges
Java Objects as JSON payloads.

# Default Configuration
[Link to usage instructions](https://egeria-project.org/connectors/resource/kafka-open-metadata-topic-connector/) in the connector catalog.

## Producer
## Implementation Notes
### Default Configuration
These are default property settings passed to Apache Kafka for the producer and consumer.

#### Producer

(see [Apache Kafka producer configurations](http://kafka.apache.org/0100/documentation.html#producerconfigs) for more information and options)

Expand All @@ -29,7 +33,7 @@ Java Objects as JSON payloads.
| bring.up.retries | 10 |
| bring.up.minSleepTime | 5000 |

## Consumer
#### Consumer

(see [Apache Kafka consumer configurations](http://kafka.apache.org/0100/documentation.html#newconsumerconfigs) for more information and options)

Expand All @@ -45,12 +49,12 @@ Java Objects as JSON payloads.
| bring.up.retries | 10 |
| bring.up.minSleepTime | 5000 |

# Security
### Security

By default kafka security is not configured. The exact configuration may depend on the specific kafka service being used. Service specific notes
By default, kafka security is not configured. The exact configuration may depend on the specific kafka service being used. Service specific notes
are below. They may work for other providers, and feedback is welcome so that this documentation can be updated accordingly.

## IBM Event Streams on IBM Cloud
#### IBM Event Streams on IBM Cloud

There are 2 key pieces of information that are provided in the documentation for your configured cloud service

Expand All @@ -69,7 +73,7 @@ There are 2 key pieces of information that are provided in the documentation for
```
An example of a use of this configuration can be found in the virtual data connector helm charts. See [odpi-egeria-vdc helm chart](https://github.com/odpi/egeria-samples/tree/main/helm-charts/odpi-egeria-vdc/README.md)

## Handling Kafka Cluster Bring Up Issues
#### Handling Kafka Cluster Bring Up Issues

In some environments users have encountered issues when the Kafka Cluster hasn't become fully available, when attempting a connection to the Kafka Cluster.
The Egeria KafkaTopicConnector provides a mechanism that verifies that the Kafka Cluster is actually running brokers before attempting to connect.
Expand All @@ -82,27 +86,28 @@ bring.up.retries
defaults to 10 and specifies the number of times the Egeria KafkaTopicConnector will retry verification before reporting a failure.

bring.up.minSleepTime is set to 5000ms by default and is the minimum amount of time to wait before attempting a verification retry.
If a Kafka verification attempt takes longer than this value the KafkaTopicConnector does not pause before retring the verification.
If a Kafka verification attempt takes longer than this value the KafkaTopicConnector does not pause before retrying the verification.

## Topic Creation
#### Topic Creation

In addition many enterprise kafka services do not allow automatic topic creation.
In addition, many enterprise kafka services do not allow automatic topic creation.

You will need to manually create topics of the following form

BASE_TOPIC_NAME is the value used for topicURLRoot when configuring the egeria event bus. For example, the default
value is `egeria`.

### Cohort topics
##### Cohort topics

For each cohort being used (such as `cocoCohort`):
* BASE_TOPIC_NAME.omag.openmetadata.repositoryservices.cohort.COHORT_NAME.OMRSTopic

### OMAS Topics
##### OMAS Topics

These need to be done FOR EACH SERVER configured to run one or more OMASs.
(For example for Coco Pharmaceuticals this might include `cocoMDS1`, `cocoMDS2`, `cocoMDS3` etc).
(For example for Coco Pharmaceuticals this might include `cocoMDS1`, `cocoMDS2`, `cocoMDS3` etc.)

FOR EACH OMAS configured (eg Asset Consumer OMAS, Data Platform OMAS, Governance Engine OMAS etc)
FOR EACH OMAS configured (eg Asset Consumer OMAS, Data Platform OMAS, Governance Engine OMAS etc.)

* BASE_TOPIC_NAME.omag.server.SERVER_NAME.omas.OMAS_NAME.InTopic
* BASE_TOPIC_NAME.omag.server.SERVER_NAME.omas.OMAS_NAME.OutTopic
Expand All @@ -111,7 +116,7 @@ FOR EACH OMAS configured (eg Asset Consumer OMAS, Data Platform OMAS, Governance
One way to configure is to initially run against a kafka service which allows auto topic creation, then make note of the kafka
topics that have been created - so that they can be replicated on the restricted setup.

In addition review the Egeria Audit Log for any events beginning OCF-KAFKA-TOPIC-CONNECTOR so that
In addition, review the Egeria Audit Log for any events beginning OCF-KAFKA-TOPIC-CONNECTOR so that
action may be taken if for example topics are found to be missing.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ FileAlterationListenerAdaptor getListener()
*/
class FileCataloguingListener extends FileAlterationListenerAdaptor
{
private DataFilesMonitorIntegrationConnector connector;
private final DataFilesMonitorIntegrationConnector connector;

FileCataloguingListener(DataFilesMonitorIntegrationConnector connector)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.odpi.openmetadata.adapters.connectors.integration.kafka.ffdc.KafkaIntegrationConnectorAuditCode;
import org.odpi.openmetadata.adapters.connectors.integration.kafka.ffdc.KafkaIntegrationConnectorErrorCode;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException;
import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties;
import org.odpi.openmetadata.frameworks.connectors.properties.EndpointProperties;
import org.odpi.openmetadata.integrationservices.topic.connector.TopicIntegratorConnector;
import org.odpi.openmetadata.integrationservices.topic.connector.TopicIntegratorContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class OpenAPIMonitorIntegrationConnector extends APIIntegratorConnector i
private String templateQualifiedName = null;
private String targetRootURL = null;

private Map<String, RESTClient> restClients = new HashMap<>();
private final Map<String, RESTClient> restClients = new HashMap<>();

private APIIntegratorContext myContext = null;

Expand Down Expand Up @@ -541,7 +541,7 @@ private String getEndpointGUID(String url,

/**
* Create a new API element if one does not already exist in the open metadata catalog. The GUID of the API element is
* returned but it is the responsibility of the caller to add it to the apiGUIDMap if needed.
* returned, but it is the responsibility of the caller to add it to the apiGUIDMap if needed.
*
* @param url URL of the API
* @param endpointGUID unique identifier for endpoint element that the API should be connected to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package org.odpi.openmetadata.adapters.connectors.integration.openlineage;

import org.odpi.openmetadata.adapters.connectors.integration.openlineage.ffdc.OpenLineageIntegrationConnectorErrorCode;
import org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException;
Expand All @@ -23,9 +22,8 @@


/**
* FileBasedOpenLineageLogStoreConnector provides a connector implementation for a file based open lineage log.
* The open lineage log is stored in a directory and each open lineage event record is stored as a file with a filename built
* from the record's unique identifier (runId), time and status. The record is stored in a subdirectory that is made from the namespace and job.
* APIBasedOpenLineageLogStoreConnector provides a connector implementation for an API based open lineage log.
* Each lineage record is passed to the supplied lineage API.
*/
public class APIBasedOpenLineageLogStoreConnector extends OpenLineageLogStoreConnectorBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import org.odpi.openmetadata.adapters.connectors.integration.openlineage.ffdc.OpenLineageIntegrationConnectorAuditCode;
import org.odpi.openmetadata.frameworks.connectors.Connector;
import org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException;
import org.odpi.openmetadata.frameworks.connectors.properties.ConnectionProperties;
import org.odpi.openmetadata.frameworks.connectors.properties.EndpointProperties;
Expand All @@ -15,7 +14,6 @@
import org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.OpenMetadataTopicListener;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


Expand All @@ -26,7 +24,7 @@
public class OpenLineageEventReceiverIntegrationConnector extends LineageIntegratorConnector implements OpenMetadataTopicListener
{
private LineageIntegratorContext myContext = null;
private Map<String, OpenMetadataTopicConnector> topicConnectors = new HashMap<>();
private final Map<String, OpenMetadataTopicConnector> topicConnectors = new HashMap<>();


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public enum CommonServicesDescription implements Serializable
OPEN_METADATA_SECURITY (183,
ComponentDevelopmentStatus.STABLE,
"Open Metadata Security Services",
null,
null, // no REST API
"Authorization services for Open Metadata and Governance",
"https://egeria-project.org/services/metadata-security-services"),

Expand All @@ -46,7 +46,15 @@ public enum CommonServicesDescription implements Serializable
"Open Metadata Store Services",
"open-metadata-store",
"Provides generic open metadata retrieval and management services for Open Metadata Access Services (OMASs).",
"https://egeria-project.org/services/gaf-metadata-management"),;
"https://egeria-project.org/services/gaf-metadata-management"),

PLATFORM_SERVICES (185,
ComponentDevelopmentStatus.STABLE,
"Platform Services",
"platform-services",
"Provides information about the registered services and connectors available in an OMAG Server Platform.",
"https://egeria-project.org/services/platform-services/overview"),
;


private static final long serialVersionUID = 1L;
Expand All @@ -71,7 +79,9 @@ public static List<CommonServicesDescription> getGovernanceServersDescriptionLis
serviceDescriptionList.add(CommonServicesDescription.REPOSITORY_SERVICES);
serviceDescriptionList.add(CommonServicesDescription.ADMIN_OPERATIONAL_SERVICES);
serviceDescriptionList.add(CommonServicesDescription.OCF_METADATA_MANAGEMENT);
serviceDescriptionList.add(CommonServicesDescription.GAF_METADATA_MANAGEMENT);
serviceDescriptionList.add(CommonServicesDescription.OPEN_METADATA_SECURITY);
serviceDescriptionList.add(CommonServicesDescription.PLATFORM_SERVICES);

return serviceDescriptionList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public class OMAGConformanceSuiteConfigServices
{
static private final int maxPageSize = 50;

private static RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(OMAGConformanceSuiteConfigServices.class),
CommonServicesDescription.ADMIN_OPERATIONAL_SERVICES.getServiceName());
private static final RESTCallLogger restCallLogger = new RESTCallLogger(LoggerFactory.getLogger(OMAGConformanceSuiteConfigServices.class),
CommonServicesDescription.ADMIN_OPERATIONAL_SERVICES.getServiceName());

private OMAGServerAdminStoreServices configStore = new OMAGServerAdminStoreServices();
private OMAGServerErrorHandler errorHandler = new OMAGServerErrorHandler();
private OMAGServerExceptionHandler exceptionHandler = new OMAGServerExceptionHandler();
private final OMAGServerAdminStoreServices configStore = new OMAGServerAdminStoreServices();
private final OMAGServerErrorHandler errorHandler = new OMAGServerErrorHandler();
private final OMAGServerExceptionHandler exceptionHandler = new OMAGServerExceptionHandler();


/**
Expand Down
Loading