mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-18 13:31:41 +00:00
Fix for test logging exception for metadata service + updated Insight Template URl (#11485)
This commit is contained in:
parent
65fc94a292
commit
98201724c3
@ -125,49 +125,52 @@ public class IngestionPipelineResource extends EntityResource<IngestionPipeline,
|
||||
this.pipelineServiceClient =
|
||||
PipelineServiceClientFactory.createPipelineServiceClient(config.getPipelineServiceClientConfiguration());
|
||||
dao.setPipelineServiceClient(pipelineServiceClient);
|
||||
createIndexAndInsightPipeline();
|
||||
createIndexAndInsightPipeline(config);
|
||||
}
|
||||
|
||||
private void createIndexAndInsightPipeline() {
|
||||
try {
|
||||
EntityReference metadataService =
|
||||
this.metadataServiceRepository
|
||||
.getByName(null, OPENMETADATA_SERVICE, dao.getFields("id"))
|
||||
.getEntityReference();
|
||||
// Create Data Insights Pipeline
|
||||
CreateIngestionPipeline createPipelineRequest =
|
||||
new CreateIngestionPipeline()
|
||||
.withName(DEFAULT_INSIGHT_PIPELINE)
|
||||
.withDisplayName(DEFAULT_INSIGHT_PIPELINE)
|
||||
.withDescription("Data Insights Pipeline")
|
||||
.withPipelineType(PipelineType.DATA_INSIGHT)
|
||||
.withSourceConfig(
|
||||
new SourceConfig()
|
||||
.withConfig(
|
||||
new MetadataToElasticSearchPipeline()
|
||||
.withType(
|
||||
MetadataToElasticSearchPipeline.MetadataToESConfigType.METADATA_TO_ELASTIC_SEARCH)))
|
||||
.withAirflowConfig(IngestionPipelineUtils.getDefaultAirflowConfig())
|
||||
.withService(metadataService);
|
||||
// Get Pipeline
|
||||
IngestionPipeline dataInsightPipeline =
|
||||
getIngestionPipeline(createPipelineRequest, "system").withProvider(ProviderType.SYSTEM);
|
||||
dao.setFullyQualifiedName(dataInsightPipeline);
|
||||
dao.initializeEntity(dataInsightPipeline);
|
||||
private void createIndexAndInsightPipeline(OpenMetadataApplicationConfig config) {
|
||||
// Metadata Service is created only when ES config is present
|
||||
if (config.getElasticSearchConfiguration() != null) {
|
||||
try {
|
||||
EntityReference metadataService =
|
||||
this.metadataServiceRepository
|
||||
.getByName(null, OPENMETADATA_SERVICE, dao.getFields("id"))
|
||||
.getEntityReference();
|
||||
// Create Data Insights Pipeline
|
||||
CreateIngestionPipeline createPipelineRequest =
|
||||
new CreateIngestionPipeline()
|
||||
.withName(DEFAULT_INSIGHT_PIPELINE)
|
||||
.withDisplayName(DEFAULT_INSIGHT_PIPELINE)
|
||||
.withDescription("Data Insights Pipeline")
|
||||
.withPipelineType(PipelineType.DATA_INSIGHT)
|
||||
.withSourceConfig(
|
||||
new SourceConfig()
|
||||
.withConfig(
|
||||
new MetadataToElasticSearchPipeline()
|
||||
.withType(
|
||||
MetadataToElasticSearchPipeline.MetadataToESConfigType.METADATA_TO_ELASTIC_SEARCH)))
|
||||
.withAirflowConfig(IngestionPipelineUtils.getDefaultAirflowConfig())
|
||||
.withService(metadataService);
|
||||
// Get Pipeline
|
||||
IngestionPipeline dataInsightPipeline =
|
||||
getIngestionPipeline(createPipelineRequest, "system").withProvider(ProviderType.SYSTEM);
|
||||
dao.setFullyQualifiedName(dataInsightPipeline);
|
||||
dao.initializeEntity(dataInsightPipeline);
|
||||
|
||||
// Create Reindex Pipeline
|
||||
createPipelineRequest
|
||||
.withName(DEFAULT_REINDEX_PIPELINE)
|
||||
.withDisplayName(DEFAULT_REINDEX_PIPELINE)
|
||||
.withDescription("Elastic Search Reindexing Pipeline")
|
||||
.withPipelineType(PipelineType.ELASTIC_SEARCH_REINDEX);
|
||||
// Get Pipeline
|
||||
IngestionPipeline elasticSearchPipeline =
|
||||
getIngestionPipeline(createPipelineRequest, "system").withProvider(ProviderType.SYSTEM);
|
||||
dao.setFullyQualifiedName(elasticSearchPipeline);
|
||||
dao.initializeEntity(elasticSearchPipeline);
|
||||
} catch (Exception ex) {
|
||||
LOG.error("[IngestionPipelineResource] Failed in Creating Reindex and Insight Pipeline", ex);
|
||||
// Create Reindex Pipeline
|
||||
createPipelineRequest
|
||||
.withName(DEFAULT_REINDEX_PIPELINE)
|
||||
.withDisplayName(DEFAULT_REINDEX_PIPELINE)
|
||||
.withDescription("Elastic Search Reindexing Pipeline")
|
||||
.withPipelineType(PipelineType.ELASTIC_SEARCH_REINDEX);
|
||||
// Get Pipeline
|
||||
IngestionPipeline elasticSearchPipeline =
|
||||
getIngestionPipeline(createPipelineRequest, "system").withProvider(ProviderType.SYSTEM);
|
||||
dao.setFullyQualifiedName(elasticSearchPipeline);
|
||||
dao.initializeEntity(elasticSearchPipeline);
|
||||
} catch (Exception ex) {
|
||||
LOG.error("[IngestionPipelineResource] Failed in Creating Reindex and Insight Pipeline", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@
|
||||
<td align="center" valign="top" height="759" bgcolor="#ffffff" style="padding: 10px; height: 759px;">
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="590" style="width: 590px;">
|
||||
<div>
|
||||
<img src="img/i-1839955869.png" width="1000" alt="" border="0" style="display: block; max-width: 1000px; width: 100%;" class="w1000px">
|
||||
<img src="https://i.imgur.com/ARPP9s5.png" width="1000" alt="" border="0" style="display: block; max-width: 1000px; width: 100%;" class="w1000px">
|
||||
</div>
|
||||
</table>
|
||||
<div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user