mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-10 07:53:35 +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 {
|
private void createIndexInternal(String entityType) throws IOException {
|
||||||
IndexMapping resultIndexType = searchRepository.getIndexMapping(entityType);
|
IndexMapping resultIndexType = searchRepository.getIndexMapping(entityType);
|
||||||
if (!searchRepository.indexExists(resultIndexType)) {
|
if (!searchRepository.indexExists(resultIndexType)) {
|
||||||
|
LOG.info(String.format("[Data Insights] Creating Index for Entity Type: '%s'", entityType));
|
||||||
searchRepository.createIndex(resultIndexType);
|
searchRepository.createIndex(resultIndexType);
|
||||||
}
|
}
|
||||||
DataInsightsSearchInterface searchInterface = getSearchInterface();
|
DataInsightsSearchInterface searchInterface = getSearchInterface();
|
||||||
if (!searchInterface.dataAssetDataStreamExists(
|
if (!searchInterface.dataAssetDataStreamExists(
|
||||||
getDataStreamName(searchRepository.getClusterAlias(), entityType))) {
|
getDataStreamName(searchRepository.getClusterAlias(), entityType))) {
|
||||||
|
LOG.info(String.format("[Data Insights] Creating Index for Entity Type: '%s'", entityType));
|
||||||
searchRepository
|
searchRepository
|
||||||
.getSearchClient()
|
.getSearchClient()
|
||||||
.addIndexAlias(
|
.addIndexAlias(
|
||||||
@ -141,6 +143,7 @@ public class DataInsightsApp extends AbstractNativeApplication {
|
|||||||
private void deleteIndexInternal(String entityType) {
|
private void deleteIndexInternal(String entityType) {
|
||||||
IndexMapping resultIndexType = searchRepository.getIndexMapping(entityType);
|
IndexMapping resultIndexType = searchRepository.getIndexMapping(entityType);
|
||||||
if (searchRepository.indexExists(resultIndexType)) {
|
if (searchRepository.indexExists(resultIndexType)) {
|
||||||
|
LOG.info(String.format("[Data Insights] Deleting Index for Entity Type: '%s'", entityType));
|
||||||
searchRepository.deleteIndex(resultIndexType);
|
searchRepository.deleteIndex(resultIndexType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,6 +134,6 @@ public class OpenSearchDataInsightsClient implements DataInsightsSearchInterface
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteDataAssetDataStream(String name) throws IOException {
|
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()) {
|
if (!costAnalysisConfig.getEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
LOG.info("[Data Insights] Processing Cost Analysis.");
|
||||||
initialize();
|
initialize();
|
||||||
Map<String, Object> contextData = new HashMap<>();
|
Map<String, Object> contextData = new HashMap<>();
|
||||||
|
|
||||||
|
|||||||
@ -183,6 +183,7 @@ public class DataAssetsWorkflow {
|
|||||||
if (!dataAssetsConfig.getEnabled()) {
|
if (!dataAssetsConfig.getEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
LOG.info("[Data Insights] Processing Data Assets Insights.");
|
||||||
initialize();
|
initialize();
|
||||||
Map<String, Object> contextData = new HashMap<>();
|
Map<String, Object> contextData = new HashMap<>();
|
||||||
|
|
||||||
|
|||||||
@ -148,6 +148,7 @@ public class DataQualityWorkflow {
|
|||||||
if (!dataQualityConfig.getEnabled()) {
|
if (!dataQualityConfig.getEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
LOG.info("[Data Insights] Processing Data Quality Insights.");
|
||||||
initialize();
|
initialize();
|
||||||
Map<String, Object> contextData = new HashMap<>();
|
Map<String, Object> contextData = new HashMap<>();
|
||||||
|
|
||||||
|
|||||||
@ -121,6 +121,7 @@ public class WebAnalyticsWorkflow {
|
|||||||
if (!webAnalyticsConfig.getEnabled()) {
|
if (!webAnalyticsConfig.getEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
LOG.info("[Data Insights] Processing App Analytics.");
|
||||||
initialize();
|
initialize();
|
||||||
Map<String, Object> contextData = new HashMap<>();
|
Map<String, Object> contextData = new HashMap<>();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user