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

    Constructors
    Constructor
    Description
    CommandSelectionContext(@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

    Modifier and Type
    Method
    Description
    Set<com.netflix.genie.common.internal.dtos.Command>
    Return the Set of distinct resources that a selector is meant to chose from.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 for
      jobRequest - The job request the user originally made
      apiJob - Whether the job was submitted via the API or from Agent CLI
      commandToClusters - The map of command candidates to their respective clusters candidates
  • Method Details

    • getResources

      public Set<com.netflix.genie.common.internal.dtos.Command> getResources()
      Return the Set of distinct resources that a selector is meant to chose from.
      Specified by:
      getResources in class ResourceSelectionContext<com.netflix.genie.common.internal.dtos.Command>
      Returns:
      The resources