Class Command
java.lang.Object
com.netflix.genie.common.internal.dtos.CommonResource
com.netflix.genie.common.internal.dtos.Command
- All Implemented Interfaces:
Serializable
An immutable V4 Command resource.
- Since:
- 4.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommand(String id, Instant created, Instant updated, ExecutionEnvironment resources, CommandMetadata metadata, List<String> executable, List<Criterion> clusterCriteria, ComputeResources computeResources, Map<String, Image> images) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the ordered list ofCriterionfor this command to resolve clusters are runtime.Get any default compute resources that were requested for this command.Get the executable elements (generally a binary followed optionally by default arguments) that should be used with this command when executing a job.Get any image information associated by default with this command.
-
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 commandcreated- The time this command was created in the systemupdated- The last time this command was updated in the systemresources- The execution resources associated with this commandmetadata- The metadata associated with this commandexecutable- 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 removedclusterCriteria- The ordered list of clusterCriterionthat should be used to resolve which clusters this command can run on at job execution timecomputeResources- The default computational resources a job should have if this command is selectedimages- The default images the job should launch with if this command is selected
-
-
Method Details
-
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
Get the ordered list ofCriterionfor this command to resolve clusters are runtime.- Returns:
- The ordered list of
Criterionas an immutable list. Any attempt to modify will throw an exception
-
getComputeResources
Get any default compute resources that were requested for this command.- Returns:
- The
ComputeResourcesorOptional.empty()
-
getImages
Get any image information associated by default with this command.- Returns:
- The
Imagemetadata as unmodifiable map. Any attempt to modify will throw an exception
-