mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 11:56:01 +00:00
Add Opensearch max payload Size (#17392)
This commit is contained in:
parent
05baba9dc1
commit
df9753c7bb
@ -122,10 +122,18 @@ public class DataAssetsWorkflow {
|
||||
this.entityEnricher = new DataInsightsEntityEnricherProcessor(totalRecords);
|
||||
if (searchRepository.getSearchType().equals(ElasticSearchConfiguration.SearchType.OPENSEARCH)) {
|
||||
this.entityProcessor = new DataInsightsOpenSearchProcessor(totalRecords);
|
||||
this.searchIndexSink = new OpenSearchIndexSink(searchRepository, totalRecords);
|
||||
this.searchIndexSink =
|
||||
new OpenSearchIndexSink(
|
||||
searchRepository,
|
||||
totalRecords,
|
||||
searchRepository.getElasticSearchConfiguration().getPayLoadSize());
|
||||
} else {
|
||||
this.entityProcessor = new DataInsightsElasticSearchProcessor(totalRecords);
|
||||
this.searchIndexSink = new ElasticSearchIndexSink(searchRepository, totalRecords);
|
||||
this.searchIndexSink =
|
||||
new ElasticSearchIndexSink(
|
||||
searchRepository,
|
||||
totalRecords,
|
||||
searchRepository.getElasticSearchConfiguration().getPayLoadSize());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,8 @@ public class SearchIndexApp extends AbstractNativeApplication {
|
||||
if (searchRepository.getSearchType().equals(ElasticSearchConfiguration.SearchType.OPENSEARCH)) {
|
||||
this.entityProcessor = new OpenSearchEntitiesProcessor(totalRecords);
|
||||
this.entityTimeSeriesProcessor = new OpenSearchEntityTimeSeriesProcessor(totalRecords);
|
||||
this.searchIndexSink = new OpenSearchIndexSink(searchRepository, totalRecords);
|
||||
this.searchIndexSink =
|
||||
new OpenSearchIndexSink(searchRepository, totalRecords, jobData.getPayLoadSize());
|
||||
} else {
|
||||
this.entityProcessor = new ElasticSearchEntitiesProcessor(totalRecords);
|
||||
this.entityTimeSeriesProcessor = new ElasticSearchEntityTimeSeriesProcessor(totalRecords);
|
||||
|
@ -30,12 +30,6 @@ public class ElasticSearchIndexSink implements Sink<BulkRequest, BulkResponse> {
|
||||
private final SearchRepository searchRepository;
|
||||
private final int maxPayLoadSizeInBytes;
|
||||
|
||||
public ElasticSearchIndexSink(SearchRepository searchRepository, int total) {
|
||||
this.searchRepository = searchRepository;
|
||||
this.maxPayLoadSizeInBytes = searchRepository.getElasticSearchConfiguration().getPayLoadSize();
|
||||
this.stats.withTotalRecords(total).withSuccessRecords(0).withFailedRecords(0);
|
||||
}
|
||||
|
||||
public ElasticSearchIndexSink(
|
||||
SearchRepository searchRepository, int total, int maxPayLoadSizeInBytes) {
|
||||
this.searchRepository = searchRepository;
|
||||
|
@ -31,9 +31,9 @@ public class OpenSearchIndexSink implements Sink<BulkRequest, BulkResponse> {
|
||||
|
||||
private final int maxPayLoadSizeInBytes;
|
||||
|
||||
public OpenSearchIndexSink(SearchRepository repository, int total) {
|
||||
public OpenSearchIndexSink(SearchRepository repository, int total, int maxPayLoadSizeInBytes) {
|
||||
this.searchRepository = repository;
|
||||
this.maxPayLoadSizeInBytes = searchRepository.getElasticSearchConfiguration().getPayLoadSize();
|
||||
this.maxPayLoadSizeInBytes = maxPayLoadSizeInBytes;
|
||||
this.stats.withTotalRecords(total).withSuccessRecords(0).withFailedRecords(0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user