public class CommandSelectorManagedScript extends ResourceSelectorScript<com.netflix.genie.common.external.dtos.v4.Command,CommandSelectionContext>
ResourceSelectorScript which from a set of commands and the original job request will
attempt to determine the best command to use for execution.| Constructor and Description |
|---|
CommandSelectorManagedScript(ScriptManager scriptManager,
CommandSelectorManagedScriptProperties properties,
io.micrometer.core.instrument.MeterRegistry registry,
com.netflix.genie.common.internal.util.PropertiesMapCache propertyMapCache)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParametersForScript(java.util.Map<java.lang.String,java.lang.Object> parameters,
CommandSelectionContext context)
Add any implementation specific parameters to the map of parameters to send to the script.
|
ResourceSelectorScriptResult<com.netflix.genie.common.external.dtos.v4.Command> |
selectResource(CommandSelectionContext context)
Given the
JobRequest and an associated set of resources which matched the request criteria
invoke the configured script to see if a preferred resource is selected based on the current logic. |
evaluateScript, warmUppublic CommandSelectorManagedScript(ScriptManager scriptManager, CommandSelectorManagedScriptProperties properties, io.micrometer.core.instrument.MeterRegistry registry, com.netflix.genie.common.internal.util.PropertiesMapCache propertyMapCache)
scriptManager - The ScriptManager instance to useproperties - The CommandSelectorManagedScriptProperties instance to useregistry - The MeterRegistry instance to usepropertyMapCache - The PropertiesMapCache instance to usepublic ResourceSelectorScriptResult<com.netflix.genie.common.external.dtos.v4.Command> selectResource(CommandSelectionContext context) throws ResourceSelectionException
JobRequest and an associated set of resources which matched the request criteria
invoke the configured script to see if a preferred resource is selected based on the current logic.selectResource in class ResourceSelectorScript<com.netflix.genie.common.external.dtos.v4.Command,CommandSelectionContext>context - The ResourceSelectionContext instance containing information about the context for this
selectionResourceSelectorScriptResult instanceResourceSelectionException - If an unexpected error occurs during selectionprotected void addParametersForScript(java.util.Map<java.lang.String,java.lang.Object> parameters,
CommandSelectionContext context)
addParametersForScript in class ResourceSelectorScript<com.netflix.genie.common.external.dtos.v4.Command,CommandSelectionContext>parameters - The existing set of parameters for implementations to add tocontext - The selection context