public class ScriptClusterSelectorImpl extends java.lang.Object implements ClusterSelector
ClusterSelector interface which uses user-provided script to make decisions
based on the list of clusters and the job request supplied.| Constructor and Description |
|---|
ScriptClusterSelectorImpl(ClusterSelectorManagedScript clusterSelectorManagedScript,
io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ResourceSelectionResult<com.netflix.genie.common.external.dtos.v4.Cluster> |
select(@Valid ClusterSelectionContext context)
Select a resource from the given set of resources if possible.
|
public ScriptClusterSelectorImpl(ClusterSelectorManagedScript clusterSelectorManagedScript, io.micrometer.core.instrument.MeterRegistry registry)
clusterSelectorManagedScript - the cluster selector scriptregistry - the metrics registrypublic ResourceSelectionResult<com.netflix.genie.common.external.dtos.v4.Cluster> select(@Valid @Valid ClusterSelectionContext context) throws ResourceSelectionException
select in interface ResourceSelector<com.netflix.genie.common.external.dtos.v4.Cluster,ClusterSelectionContext>context - The context specific for this resource selectionResourceSelectionResult instance which contains information about the result of this
invocationResourceSelectionException - When the underlying implementation can't successfully come to a selection
decision