java.lang.Object
com.netflix.genie.common.internal.dtos.CommonResource
com.netflix.genie.common.internal.dtos.Command
All Implemented Interfaces:
Serializable

public class Command extends CommonResource
An immutable V4 Command resource.
Since:
4.0.0
See Also:
  • Constructor Details

    • Command

      public Command(String id, Instant created, Instant updated, @Nullable ExecutionEnvironment resources, CommandMetadata metadata, List<String> executable, @Nullable List<Criterion> clusterCriteria, @Nullable ComputeResources computeResources, @Nullable Map<String,Image> images)
      Constructor.
      Parameters:
      id - The unique identifier of this command
      created - The time this command was created in the system
      updated - The last time this command was updated in the system
      resources - The execution resources associated with this command
      metadata - The metadata associated with this command
      executable - The executable command that will be used when a job is run with this command. Generally this will start with the binary and be followed optionally by default arguments. Must have at least one. Blanks will be removed
      clusterCriteria - The ordered list of cluster Criterion that should be used to resolve which clusters this command can run on at job execution time
      computeResources - The default computational resources a job should have if this command is selected
      images - The default images the job should launch with if this command is selected
  • Method Details

    • getExecutable

      public List<String> getExecutable()
      Get the executable elements (generally a binary followed optionally by default arguments) that should be used with this command when executing a job.
      Returns:
      The executable arguments as an immutable list. Any attempt to modify will throw an exception
    • getClusterCriteria

      public List<Criterion> getClusterCriteria()
      Get the ordered list of Criterion for this command to resolve clusters are runtime.
      Returns:
      The ordered list of Criterion as an immutable list. Any attempt to modify will throw an exception
    • getComputeResources

      public ComputeResources getComputeResources()
      Get any default compute resources that were requested for this command.
      Returns:
      The ComputeResources or Optional.empty()
    • getImages

      public Map<String,Image> getImages()
      Get any image information associated by default with this command.
      Returns:
      The Image metadata as unmodifiable map. Any attempt to modify will throw an exception