Commit 9ee8fcf2 authored by Hema Vishnu Pola [Microsoft]'s avatar Hema Vishnu Pola [Microsoft]
Browse files

Merge branch 'cosmos-bulk-executor-fixes' into 'master'

Fixing Bulk Executor Configurations

See merge request !73
parents 172a1b47 442b141b
Pipeline #22362 passed with stages
in 10 minutes and 51 seconds
package org.opengroup.osdu.azure.di;
import com.microsoft.azure.documentdb.internal.Utils;
import lombok.Getter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -18,8 +17,7 @@ public class CosmosBulkExecutorConfiguration {
*/
@Bean
public int documentClientMaxPoolSize() {
String prop = System.getProperty("DOCUMENT_CLIENT_MAX_POOL_SIZE");
return prop == null ? Utils.getConcurrencyFactor() * 100 : Integer.parseInt(prop);
return Integer.parseInt(System.getenv().getOrDefault("DOCUMENT_CLIENT_MAX_POOL_SIZE", "100"));
}
/**
......@@ -27,6 +25,6 @@ public class CosmosBulkExecutorConfiguration {
*/
@Bean
public Integer bulkExecutorMaxRUs() {
return Integer.valueOf(System.getProperty("BULK_EXECUTOR_MAX_RUS", "4000"));
return Integer.parseInt(System.getenv().getOrDefault("BULK_EXECUTOR_MAX_RUS", "4000"));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment