Skip to content

Commit

Permalink
Merge pull request odpi#8391 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Tidy up synchronized methods in OCF framework
  • Loading branch information
mandy-chessell committed Sep 20, 2024
2 parents b7d5f16 + 7350742 commit 85da3dc
Show file tree
Hide file tree
Showing 56 changed files with 230 additions and 185 deletions.
2 changes: 1 addition & 1 deletion EgeriaContentPacksGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoBusinessSystemsArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoClinicalTrialsTemplatesArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoComboArchive.omarchive

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoGovernanceProgramArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoOrganizationArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoSustainabilityArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoTypesArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package org.odpi.openmetadata.accessservices.assetconsumer.server;

import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException;
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.*;
import org.odpi.openmetadata.accessservices.assetconsumer.handlers.LoggingHandler;
import org.odpi.openmetadata.frameworks.openmetadata.metadataelements.AssetGraph;
Expand Down Expand Up @@ -520,7 +521,7 @@ public AssetSearchMatchesListResponse findAssetsInDomain(String
OpenMetadataType.ASSET.typeName,
methodName);
}
catch (InvalidParameterException notVisible)
catch (InvalidParameterException | UserNotAuthorizedException notVisible)
{
asset = null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

![Released](../../../../../images/egeria-content-status-released.png#pagewidth)
![Deprecated](../../../../../images/egeria-content-status-deprecated.png#pagewidth)

[![javadoc](https://javadoc.io/badge2/org.odpi.egeria/configuration-encrypted-file-store-connector/javadoc.svg)](https://javadoc.io/doc/org.odpi.egeria/configuration-encrypted-file-store-connector)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ConnectorConfigurationFactory
private static final String defaultCohortTopicConnectorRootName = defaultTopicRootName + "cohort.";


private static final String ENCRYPTED_FILE_BASED_SERVER_CONFIG_STORE_PROVIDER = "org.odpi.openmetadata.adapters.adminservices.configurationstore.encryptedfile.EncryptedFileBasedServerConfigStoreProvider";
private static final String FILE_BASED_SERVER_CONFIG_STORE_PROVIDER = "org.odpi.openmetadata.adapters.adminservices.configurationstore.file.FileBasedServerConfigStoreProvider";
private static final String IN_MEMORY_OPEN_METADATA_TOPIC_PROVIDER = "org.odpi.openmetadata.adapters.eventbus.topic.inmemory.InMemoryOpenMetadataTopicProvider";
private static final String KAFKA_OPEN_METADATA_TOPIC_PROVIDER = "org.odpi.openmetadata.adapters.eventbus.topic.kafka.KafkaOpenMetadataTopicProvider";
private static final String FILE_BASED_OPEN_METADATA_ARCHIVE_STORE_PROVIDER = "org.odpi.openmetadata.adapters.repositoryservices.archiveconnector.file.FileBasedOpenMetadataArchiveStoreProvider";
Expand Down Expand Up @@ -89,9 +89,9 @@ public Connection getServerConfigConnection(String serverName)
endpoint.setAddress("data/servers/" + serverName + "/config/" + serverName + ".config");

Connection connection = new Connection();
connection.setDisplayName("Encrypted File Config Store Connection");
connection.setDisplayName("File Config Store Connection");
connection.setEndpoint(endpoint);
connection.setConnectorType(getConnectorType(ENCRYPTED_FILE_BASED_SERVER_CONFIG_STORE_PROVIDER));
connection.setConnectorType(getConnectorType(FILE_BASED_SERVER_CONFIG_STORE_PROVIDER));
connection.setQualifiedName(endpoint.getAddress());

return connection;
Expand All @@ -105,8 +105,8 @@ public Connection getServerConfigConnection(String serverName)
public Connection getServerConfigConnectionForRetrieveAll()
{
Connection connection = new Connection();
connection.setDisplayName("Encrypted File Config Store Connection");
connection.setConnectorType(getConnectorType(ENCRYPTED_FILE_BASED_SERVER_CONFIG_STORE_PROVIDER));
connection.setDisplayName("File Config Store Connection");
connection.setConnectorType(getConnectorType(FILE_BASED_SERVER_CONFIG_STORE_PROVIDER));
return connection;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class PostgresServerIntegrationConnector extends InfrastructureIntegrator
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
super.start();

Expand Down Expand Up @@ -514,7 +514,7 @@ private void catalogDatabase(String databaseName,
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void disconnect() throws ConnectorCheckedException
public void disconnect() throws ConnectorCheckedException
{
/*
* This disconnects any embedded connections such as secrets connectors.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#@ucURL=http://localhost:8080
@ucURL=http://egeria.pdr-associates.com:8070
@ucURL=http://localhost:8080
#@ucURL=http://egeria.pdr-associates.com:8070

###
# @name list catalogs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

#@ucURL=http://localhost:8080
@ucURL=http://egeria.pdr-associates.com:8070
@ucURL=http://localhost:8080
#@ucURL=http://egeria.pdr-associates.com:8070

###
# @name list schemas
GET {{ucURL}}/api/2.1/unity-catalog/schemas?catalog_name=unity&max_results=10
GET {{ucURL}}/api/2.1/unity-catalog/schemas?catalog_name=clinical_trials&max_results=10

###
# @name create schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ Content-Type: application/json
# =====================================================================================================================
# Set up Unity Catalog ...

###
# @name create catalog
POST {{ucURL}}/api/2.1/unity-catalog/catalogs
Content-Type: application/json

{
"name": "clinical_trials",
"comment": "Clinical trials data for personalized medicine research."
}


###
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#@ucURL=http://localhost:8080
@ucURL=http://egeria.pdr-associates.com:8070
@ucURL=http://localhost:8080
#@ucURL=http://egeria.pdr-associates.com:8070

###
# @name list tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

#@ucURL=http://localhost:8080
@ucURL=http://egeria.pdr-associates.com:8070
@ucURL=http://localhost:8080
#ucURL=http://egeria.pdr-associates.com:8070

###
# @name list volumes
GET {{ucURL}}/api/2.1/unity-catalog/volumes?catalog_name=unity&schema_name=default&max_results=10
GET {{ucURL}}/api/2.1/unity-catalog/volumes?catalog_name=clinical_trials&schema_name=teddy_bear_drop_foot&max_results=10

###
# @name create volume
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class OSSUnityCatalogInsideCatalogSyncConnector extends CatalogIntegrator
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
final String methodName = "start";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class OSSUnityCatalogServerSyncConnector extends CatalogIntegratorConn
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
final String methodName = "start";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void initializeEmbeddedConnectors(List<Connector> embeddedConnectors)
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
super.start();

Expand Down Expand Up @@ -404,7 +404,7 @@ private String getPlaceholders(int numberOfColumns)
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void disconnect() throws ConnectorCheckedException
public void disconnect() throws ConnectorCheckedException
{
/*
* This disconnects any embedded connections such as secrets connectors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private List<ArchiveDestination> getEmbeddedArchiveStoresConnectors()
* @throws ConnectorCheckedException there is a problem within the archive service.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
super.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ public ResourceProfileAnnotation getDataProfileAnnotation()
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void disconnect() throws ConnectorCheckedException
public void disconnect() throws ConnectorCheckedException
{
if (connector != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void start() throws ConnectorCheckedException
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void disconnect() throws ConnectorCheckedException
public void disconnect() throws ConnectorCheckedException
{
if (connector != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ static class InaccessibleFile
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void disconnect() throws ConnectorCheckedException
public void disconnect() throws ConnectorCheckedException
{
if (connector != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public CatalogServerGovernanceActionConnector()
* @throws ConnectorCheckedException there is a problem within the governance action service.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
final String methodName = "start";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public CreateServerGovernanceActionConnector()
* @throws ConnectorCheckedException there is a problem within the governance action service.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
final String methodName = "start";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -979,15 +979,12 @@ private void assessElementForMonitoring(String elementGUID,
* @throws ConnectorCheckedException something failed in the super class
*/
@Override
public synchronized void disconnect() throws ConnectorCheckedException
public void disconnect() throws ConnectorCheckedException
{
final String methodName = "disconnect";

if (auditLog != null)
{
auditLog.logMessage(methodName,
EgeriaInfrastructureConnectorAuditCode.CONNECTOR_STOPPING.getMessageDefinition(connectorName));
}
auditLog.logMessage(methodName,
EgeriaInfrastructureConnectorAuditCode.CONNECTOR_STOPPING.getMessageDefinition(connectorName));

super.disconnect();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# openLineage requests

#@openLineageBackend=http://localhost:5000
@openLineageBackend=http://egeria.pdr-associates.com:5050
#@openLineageBackend=https://localhost:9443/servers/integration-daemon/open-metadata/integration-services/lineage-integrator/users/airflownpa
#@openLineageBackend=http://localhost:6000
#@openLineageBackend=http://egeria.pdr-associates.com:5050
@openLineageBackend=https://localhost:9443/servers/integration-daemon/open-metadata/integration-services/lineage-integrator/users/airflownpa
@openLineageNamespace=restTestNameSpace
@openLineageRunId=001

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public GovernanceActionOpenLineageIntegrationConnector()
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
super.start();

Expand All @@ -68,15 +68,12 @@ public synchronized void start() throws ConnectorCheckedException
}
catch (Exception error)
{
if (auditLog != null)
{
auditLog.logException(methodName,
OpenLineageIntegrationConnectorAuditCode.UNEXPECTED_EXCEPTION.getMessageDefinition(connectorName,
error.getClass().getName(),
methodName,
error.getMessage()),
error);
}
auditLog.logException(methodName,
OpenLineageIntegrationConnectorAuditCode.UNEXPECTED_EXCEPTION.getMessageDefinition(connectorName,
error.getClass().getName(),
methodName,
error.getMessage()),
error);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ else if (connectionProperties.getConnectorType() != null)
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
super.start();

Expand All @@ -181,7 +181,7 @@ public synchronized void start() throws ConnectorCheckedException
* @throws ConnectorCheckedException there is a problem with the connector. It is not able to refresh the catalog targets.
*/
@Override
public synchronized void refresh() throws ConnectorCheckedException
public void refresh() throws ConnectorCheckedException
{
final String methodName = "refresh";

Expand Down Expand Up @@ -281,8 +281,8 @@ else if (propertyHelper.isTypeOf(catalogTarget.getCatalogTargetElement(), OpenMe
* @param rawEvent json payload received for the event
*/
@Override
public synchronized void processOpenLineageRunEvent(OpenLineageRunEvent event,
String rawEvent)
public void processOpenLineageRunEvent(OpenLineageRunEvent event,
String rawEvent)
{
final String methodName = "processOpenLineageRunEvent";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public enum XTDBAuditCode implements AuditLogMessageSet
* OMRS-XTDB-REPOSITORY-0016 - A search was requested for property {0} which does not match any of the type restrictions: {1}
*/
INVALID_PROPERTY("OMRS-XTDB-REPOSITORY-0016",
AuditLogRecordSeverityLevel.INFO,
AuditLogRecordSeverityLevel.TRACE,
"A search was requested for property {0} which does not match any of the type restrictions: {1}",
"The requested search is for a property which does not exist on any of the types for which the search is restricted, and therefore no results will be returned.",
"This message is provided for informational purposes, should a user expect some results to their search " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public DescribeTopicsResult describeTopics() throws ConnectorCheckedException
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void disconnect() throws ConnectorCheckedException
public void disconnect() throws ConnectorCheckedException
{
if (kafkaAdminClient != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public String toString()
* @throws ConnectorCheckedException there is a problem within the connector.
*/
@Override
public synchronized void start() throws ConnectorCheckedException
public void start() throws ConnectorCheckedException
{
super.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public VoidResponse setXTDBLocalKVRepository(@PathVariable String userI
externalDocs=@ExternalDocumentation(description="Further Information",
url="https://egeria-project.org/connectors/repository/xtdb/"))

public VoidResponse setXTDBLocalRepository(@PathVariable String userId,
public VoidResponse setXTDBLocalRepository(@PathVariable String userId,
@PathVariable String serverName,
@RequestBody Map<String, Object> storageProperties)
{
Expand Down
Loading

0 comments on commit 85da3dc

Please sign in to comment.