Class CommandRequest.Builder
java.lang.Object
com.netflix.genie.common.internal.dtos.CommonRequestImpl.Builder<CommandRequest.Builder>
com.netflix.genie.common.internal.dtos.CommandRequest.Builder
- Enclosing class:
- CommandRequest
public static class CommandRequest.Builder
extends com.netflix.genie.common.internal.dtos.CommonRequestImpl.Builder<CommandRequest.Builder>
Builder for a V4 Command Request.
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(CommandMetadata metadata, List<String> executable) Constructor which has required fields. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a new CommandRequest instance.withClusterCriteria
(List<Criterion> clusterCriteria) Set the ordered list ofCriterion
that should be used to resolve which clusters this command can run on at any given time.withComputeResources
(ComputeResources computeResources) Set any default compute resources that should be used if this command is selected.withImages
(Map<String, Image> images) Set any default image metadata that should be used if this command is selected.Methods inherited from class com.netflix.genie.common.internal.dtos.CommonRequestImpl.Builder
withRequestedId, withResources
-
Constructor Details
-
Builder
Constructor which has required fields.- Parameters:
metadata
- The user supplied metadata about a command resourceexecutable
- The executable arguments to use on job process launch. Typically the binary path followed by optional default parameters for that given binary. Must have at least one. Blanks will be removed
-
-
Method Details
-
withClusterCriteria
Set the ordered list ofCriterion
that should be used to resolve which clusters this command can run on at any given time.- Parameters:
clusterCriteria
- TheCriterion
in priority order- Returns:
- The builder
-
withComputeResources
Set any default compute resources that should be used if this command is selected.- Parameters:
computeResources
- TheComputeResources
orOptional.empty()
- Returns:
- This
CommandRequest.Builder
instance
-
withImages
Set any default image metadata that should be used if this command is selected.- Parameters:
images
- TheImage
's or null- Returns:
- This
CommandRequest.Builder
instance
-
build
Build a new CommandRequest instance.- Returns:
- The immutable command request
-