@Configuration @EnableConfigurationProperties(value=ScriptLoadBalancerProperties.class) public class GenieClusterLoadBalancerAutoConfiguration extends java.lang.Object
ClusterLoadBalancer for this Genie
instance.| Modifier and Type | Field and Description |
|---|---|
static int |
SCRIPT_LOAD_BALANCER_PRECEDENCE
The relative order of the
ScriptLoadBalancer if one is enabled relative to other
ClusterLoadBalancer instances that may be in the context. |
| Constructor and Description |
|---|
GenieClusterLoadBalancerAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
RandomizedClusterLoadBalancerImpl |
randomizedClusterLoadBalancer()
The default cluster load balancer if all others fail.
|
ScriptLoadBalancer |
scriptLoadBalancer(org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor,
org.springframework.scheduling.TaskScheduler taskScheduler,
GenieFileTransferService fileTransferService,
org.springframework.core.env.Environment environment,
com.fasterxml.jackson.databind.ObjectMapper mapper,
io.micrometer.core.instrument.MeterRegistry registry)
Produce the
ScriptLoadBalancer instance to use for this Genie node if it was configured by the user. |
public static final int SCRIPT_LOAD_BALANCER_PRECEDENCE
ScriptLoadBalancer if one is enabled relative to other
ClusterLoadBalancer instances that may be in the context. This allows users to fit 50 more
balancer's between the script load balancer and the default RandomizedClusterLoadBalancerImpl. If
the user wants to place a balancer implementation before the script one they only need to subtract from this
value.public GenieClusterLoadBalancerAutoConfiguration()
@Bean
@Order(value=2147483597)
@ConditionalOnProperty(value="genie.jobs.clusters.load-balancers.script.enabled",
havingValue="true")
public ScriptLoadBalancer scriptLoadBalancer(@Qualifier(value="genieAsyncTaskExecutor")
org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor,
@Qualifier(value="genieTaskScheduler")
org.springframework.scheduling.TaskScheduler taskScheduler,
@Qualifier(value="cacheGenieFileTransferService")
GenieFileTransferService fileTransferService,
org.springframework.core.env.Environment environment,
com.fasterxml.jackson.databind.ObjectMapper mapper,
io.micrometer.core.instrument.MeterRegistry registry)
ScriptLoadBalancer instance to use for this Genie node if it was configured by the user.asyncTaskExecutor - The asynchronous task executor to usetaskScheduler - The task scheduler to usefileTransferService - The file transfer service to useenvironment - The program environment from Springmapper - The JSON object mapper to useregistry - The meter registry for capturing metricsScriptLoadBalancer if one enabled@Bean @Order public RandomizedClusterLoadBalancerImpl randomizedClusterLoadBalancer()
Defaults to Ordered.LOWEST_PRECEDENCE.
RandomizedClusterLoadBalancerImpl instance