mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 02:56:10 +00:00
Fix DI Data Stream delete on OpenSearch (#20447)
This commit is contained in:
parent
b4ec3f29a5
commit
690f862177
@ -126,11 +126,13 @@ public class DataInsightsApp extends AbstractNativeApplication {
|
||||
private void createIndexInternal(String entityType) throws IOException {
|
||||
IndexMapping resultIndexType = searchRepository.getIndexMapping(entityType);
|
||||
if (!searchRepository.indexExists(resultIndexType)) {
|
||||
LOG.info(String.format("[Data Insights] Creating Index for Entity Type: '%s'", entityType));
|
||||
searchRepository.createIndex(resultIndexType);
|
||||
}
|
||||
DataInsightsSearchInterface searchInterface = getSearchInterface();
|
||||
if (!searchInterface.dataAssetDataStreamExists(
|
||||
getDataStreamName(searchRepository.getClusterAlias(), entityType))) {
|
||||
LOG.info(String.format("[Data Insights] Creating Index for Entity Type: '%s'", entityType));
|
||||
searchRepository
|
||||
.getSearchClient()
|
||||
.addIndexAlias(
|
||||
@ -141,6 +143,7 @@ public class DataInsightsApp extends AbstractNativeApplication {
|
||||
private void deleteIndexInternal(String entityType) {
|
||||
IndexMapping resultIndexType = searchRepository.getIndexMapping(entityType);
|
||||
if (searchRepository.indexExists(resultIndexType)) {
|
||||
LOG.info(String.format("[Data Insights] Deleting Index for Entity Type: '%s'", entityType));
|
||||
searchRepository.deleteIndex(resultIndexType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,6 +134,6 @@ public class OpenSearchDataInsightsClient implements DataInsightsSearchInterface
|
||||
|
||||
@Override
|
||||
public void deleteDataAssetDataStream(String name) throws IOException {
|
||||
performRequest("DELETE", String.format("_data_stream/%s", name));
|
||||
performRequest("DELETE", String.format("/_data_stream/%s", name));
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,6 +138,7 @@ public class CostAnalysisWorkflow {
|
||||
if (!costAnalysisConfig.getEnabled()) {
|
||||
return;
|
||||
}
|
||||
LOG.info("[Data Insights] Processing Cost Analysis.");
|
||||
initialize();
|
||||
Map<String, Object> contextData = new HashMap<>();
|
||||
|
||||
|
||||
@ -183,6 +183,7 @@ public class DataAssetsWorkflow {
|
||||
if (!dataAssetsConfig.getEnabled()) {
|
||||
return;
|
||||
}
|
||||
LOG.info("[Data Insights] Processing Data Assets Insights.");
|
||||
initialize();
|
||||
Map<String, Object> contextData = new HashMap<>();
|
||||
|
||||
|
||||
@ -148,6 +148,7 @@ public class DataQualityWorkflow {
|
||||
if (!dataQualityConfig.getEnabled()) {
|
||||
return;
|
||||
}
|
||||
LOG.info("[Data Insights] Processing Data Quality Insights.");
|
||||
initialize();
|
||||
Map<String, Object> contextData = new HashMap<>();
|
||||
|
||||
|
||||
@ -121,6 +121,7 @@ public class WebAnalyticsWorkflow {
|
||||
if (!webAnalyticsConfig.getEnabled()) {
|
||||
return;
|
||||
}
|
||||
LOG.info("[Data Insights] Processing App Analytics.");
|
||||
initialize();
|
||||
Map<String, Object> contextData = new HashMap<>();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user