Package com.netflix.genie.web.selectors
Class CommandSelectionContext
java.lang.Object
com.netflix.genie.web.selectors.ResourceSelectionContext<com.netflix.genie.common.internal.dtos.Command>
com.netflix.genie.web.selectors.CommandSelectionContext
public class CommandSelectionContext
extends ResourceSelectionContext<com.netflix.genie.common.internal.dtos.Command>
Extension of
ResourceSelectionContext to include specific data useful in command selection.- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCommandSelectionContext(@NotBlank String jobId, @NotNull com.netflix.genie.common.internal.dtos.JobRequest jobRequest, boolean apiJob, @NotEmpty Map<@Valid com.netflix.genie.common.internal.dtos.Command, @NotEmpty Set<@Valid com.netflix.genie.common.internal.dtos.Cluster>> commandToClusters) Constructor. -
Method Summary
-
Constructor Details
-
CommandSelectionContext
public CommandSelectionContext(@NotBlank @NotBlank String jobId, @NotNull @NotNull com.netflix.genie.common.internal.dtos.JobRequest jobRequest, boolean apiJob, @NotEmpty @NotEmpty Map<@Valid com.netflix.genie.common.internal.dtos.Command, @NotEmpty Set<@Valid com.netflix.genie.common.internal.dtos.Cluster>> commandToClusters) Constructor.- Parameters:
jobId- The id of the job which the command is being selected forjobRequest- The job request the user originally madeapiJob- Whether the job was submitted via the API or from Agent CLIcommandToClusters- The map of command candidates to their respective clusters candidates
-
-
Method Details
-
getResources
Return theSetof distinct resources that a selector is meant to chose from.- Specified by:
getResourcesin classResourceSelectionContext<com.netflix.genie.common.internal.dtos.Command>- Returns:
- The resources
-