Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Lib
cloud
azure
OS Core Lib Azure
Commits
442b141b
Commit
442b141b
authored
Jan 20, 2021
by
Jason
Committed by
Hema Vishnu Pola [Microsoft]
Jan 20, 2021
Browse files
Fixing Bulk Executor Configurations
parent
172a1b47
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/opengroup/osdu/azure/di/CosmosBulkExecutorConfiguration.java
View file @
442b141b
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
.
get
Property
(
"BULK_EXECUTOR_MAX_RUS"
,
"4000"
));
return
Integer
.
parseInt
(
System
.
get
env
().
getOrDefault
(
"BULK_EXECUTOR_MAX_RUS"
,
"4000"
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment