Skip to content

Commit

Permalink
Merge pull request #8605 from mandy-chessell/oak2025
Browse files Browse the repository at this point in the history
Add thread-safe JDBC connection pool to JDBCResourceConnector
  • Loading branch information
mandy-chessell authored Jan 27, 2025
2 parents f5a6c44 + 44ffa38 commit 9886f7f
Show file tree
Hide file tree
Showing 46 changed files with 1,444 additions and 942 deletions.
2 changes: 1 addition & 1 deletion EgeriaContentPacksGUIDMap.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ platform.placeholder.variables=\
startup.user=platform
# Comma separated names of servers to be started. The server names should be unquoted.
startup.server.list=active-metadata-store,engine-host,integration-daemon,view-server,simple-metadata-store
#startup.server.list=qs-metadata-store,qs-engine-host,qs-integration-daemon,qs-view-server

################################################
### SSL security.
Expand Down
2 changes: 1 addition & 1 deletion content-packs/APIsContentPack.omarchive

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ApacheKafkaContentPack.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.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ private void processRelationshipEvent(CommunityProfileOutboundEventType eventTyp
ElementStub endTwoElementStub = converter.getElementStub(ElementStub.class, relationship.getEntityTwoProxy(), methodName);

if ((repositoryHelper.isTypeOf(sourceName, instanceTypeName, OpenMetadataType.PERSON_ROLE_APPOINTMENT_RELATIONSHIP.typeName)) ||
(repositoryHelper.isTypeOf(sourceName, instanceTypeName, OpenMetadataType.PEER_RELATIONSHIP.typeName)) ||
(repositoryHelper.isTypeOf(sourceName, instanceTypeName, OpenMetadataType.TEAM_ROLE_APPOINTMENT_RELATIONSHIP.typeName)) ||
(repositoryHelper.isTypeOf(sourceName, instanceTypeName, OpenMetadataType.IT_PROFILE_ROLE_APPOINTMENT_RELATIONSHIP.typeName)) ||
(repositoryHelper.isTypeOf(sourceName, instanceTypeName, OpenMetadataType.PEER_RELATIONSHIP.typeName)) ||
(repositoryHelper.isTypeOf(sourceName, instanceTypeName, OpenMetadataType.PROFILE_IDENTITY_RELATIONSHIP.typeName)) ||
(repositoryHelper.isTypeOf(sourceName, instanceTypeName, OpenMetadataType.TEAM_LEADER.typeName)) ||
(repositoryHelper.isTypeOf(sourceName, instanceTypeName, OpenMetadataType.TEAM_MEMBER.typeName)) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ private void catalogDatabases(String databaseServerGUID,

resultSet.close();
preparedStatement.close();
jdbcConnection.commit();
}
catch (ConnectorCheckedException exception)
{
Expand Down Expand Up @@ -389,18 +390,18 @@ private void catalogDatabase(String databaseName,
}
else
{
String databaseGUID = openMetadataAccess.createMetadataElementFromTemplate(OpenMetadataType.RELATIONAL_DATABASE.typeName,
databaseServerGUID,
false,
null,
null,
catalogTemplateName,
null,
placeholderProperties,
databaseManagerGUID,
OpenMetadataType.SERVER_ASSET_USE_RELATIONSHIP.typeName,
serverAssetUseProperties,
true);
String databaseGUID = openMetadataAccess.getMetadataElementFromTemplate(OpenMetadataType.RELATIONAL_DATABASE.typeName,
databaseServerGUID,
false,
null,
null,
catalogTemplateName,
null,
placeholderProperties,
databaseManagerGUID,
OpenMetadataType.SERVER_ASSET_USE_RELATIONSHIP.typeName,
serverAssetUseProperties,
true);

auditLog.logMessage(methodName, PostgresAuditCode.CATALOGED_DATABASE.getMessageDefinition(connectorName,
qualifiedName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public void start() throws ConnectorCheckedException
resultSet = preparedStatement.executeQuery();

resultSet.close();
jdbcConnection.commit();;

annotationStore.setAnalysisStep(AnalysisStep.MEASURE_RESOURCE.getName());
}
catch (ConnectorCheckedException error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public void start() throws ConnectorCheckedException
}
}
}

jdbcConnection.commit();
}
catch (ConnectorCheckedException error)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Content-Type: application/json
# Set up Unity Catalog ...


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


###
# @name delete volume
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,20 +285,20 @@ private void createElementInEgeria(String schemaGUID,

if (templateGUID != null)
{
ucFunctionGUID = openMetadataAccess.createMetadataElementFromTemplate(catalogGUID,
catalogQualifiedName,
deployedImplementationType.getAssociatedTypeName(),
schemaGUID,
false,
null,
null,
templateGUID,
null,
this.getPlaceholderProperties(functionInfo),
schemaGUID,
parentLinkTypeName,
null,
parentAtEnd1);
ucFunctionGUID = openMetadataAccess.getMetadataElementFromTemplate(catalogGUID,
catalogQualifiedName,
deployedImplementationType.getAssociatedTypeName(),
schemaGUID,
false,
null,
null,
templateGUID,
null,
this.getPlaceholderProperties(functionInfo),
schemaGUID,
parentLinkTypeName,
null,
parentAtEnd1);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,20 +285,20 @@ private void createElementInEgeria(String schemaGUID,

if (templateGUID != null)
{
ucModelGUID = openMetadataAccess.createMetadataElementFromTemplate(catalogGUID,
catalogQualifiedName,
deployedImplementationType.getAssociatedTypeName(),
schemaGUID,
false,
null,
null,
templateGUID,
null,
this.getPlaceholderProperties(modelInfo),
schemaGUID,
parentLinkTypeName,
null,
parentAtEnd1);
ucModelGUID = openMetadataAccess.getMetadataElementFromTemplate(catalogGUID,
catalogQualifiedName,
deployedImplementationType.getAssociatedTypeName(),
schemaGUID,
false,
null,
null,
templateGUID,
null,
this.getPlaceholderProperties(modelInfo),
schemaGUID,
parentLinkTypeName,
null,
parentAtEnd1);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,23 +255,23 @@ private void createElementInEgeria(SchemaInfo schemaInfo) throws InvalidParamete

if (templateGUID != null)
{
ucSchemaGUID = openMetadataAccess.createMetadataElementFromTemplate(catalogGUID,
catalogQualifiedName,
deployedImplementationType.getAssociatedTypeName(),
catalogGUID,
false,
null,
null,
templateGUID,
null,
this.getPlaceholderProperties(schemaInfo),
catalogGUID,
parentLinkTypeName,
propertyHelper.addEnumProperty(null,
OpenMetadataProperty.USE_TYPE.name,
ServerAssetUseType.getOpenTypeName(),
ServerAssetUseType.OWNS.getName()),
parentAtEnd1);
ucSchemaGUID = openMetadataAccess.getMetadataElementFromTemplate(catalogGUID,
catalogQualifiedName,
deployedImplementationType.getAssociatedTypeName(),
catalogGUID,
false,
null,
null,
templateGUID,
null,
this.getPlaceholderProperties(schemaInfo),
catalogGUID,
parentLinkTypeName,
propertyHelper.addEnumProperty(null,
OpenMetadataProperty.USE_TYPE.name,
ServerAssetUseType.getOpenTypeName(),
ServerAssetUseType.OWNS.getName()),
parentAtEnd1);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,20 +288,20 @@ private void createElementInEgeria(String schemaGUID,

if (templateGUID != null)
{
ucTableGUID = openMetadataAccess.createMetadataElementFromTemplate(catalogGUID,
catalogQualifiedName,
deployedImplementationType.getAssociatedTypeName(),
schemaGUID,
false,
null,
null,
templateGUID,
null,
this.getPlaceholderProperties(tableInfo),
schemaGUID,
parentLinkTypeName,
null,
parentAtEnd1);
ucTableGUID = openMetadataAccess.getMetadataElementFromTemplate(catalogGUID,
catalogQualifiedName,
deployedImplementationType.getAssociatedTypeName(),
schemaGUID,
false,
null,
null,
templateGUID,
null,
this.getPlaceholderProperties(tableInfo),
schemaGUID,
parentLinkTypeName,
null,
parentAtEnd1);
}
else
{
Expand Down
Loading

0 comments on commit 9886f7f

Please sign in to comment.