Class RunSpecification
java.lang.Object
co.yellowdog.platform.model.RunSpecification
- All Implemented Interfaces:
Serializable
@ValidatedBy(RunSpecificationValidator.class)
public class RunSpecification
extends Object
implements Serializable
Specifies the behaviours to be used by the YellowDog Scheduler when executing Tasks within the associated TaskGroup.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder that can be used to build a new RunSpecification that is automatically validated on build. -
Method Summary
Modifier and TypeMethodDescriptionstatic RunSpecification.Builder
builder()
protected boolean
boolean
If true, then do not allow claimed Workers to be shared with other task groups; otherwise, Workers can be shared.The machine instance types that can be used to execute tasksint
The maximum number of times a task can be retried after it has failed.The maximum number of Workers that can be claimed for the associated TaskGroup.The minimum number of Workers that the associated TaskGroup requires.List
<@NotBlank @Namespace String> Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on nodes from worker pools in the specified namespaces.List
<@NotNull CloudProvider> Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on the specified providers.getRam()
Range constraint on GB of RAM that are required to execute tasksConstrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup in the specified regions.Determines the number of worker claims based on splitting the number of unfinished tasks across workers.The maximum time that a worker should attempt to execute a task for before failing it.The task types that will be used in the associated TaskGroup.getVcpus()
Range constraint on number of vCPUs that are required to execute tasksConstrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on workers with a matching tag value.int
hashCode()
void
setExclusiveWorkers
(Boolean exclusiveWorkers) If true, then do not allow claimed Workers to be shared with other task groups; otherwise, Workers can be shared.void
setInstanceTypes
(List<@NotBlank String> instanceTypes) The machine instance types that can be used to execute tasksvoid
setMaximumTaskRetries
(int maximumTaskRetries) The maximum number of times a task can be retried after it has failed.void
setMaxWorkers
(Integer maxWorkers) The maximum number of Workers that can be claimed for the associated TaskGroup.void
setMinWorkers
(Integer minWorkers) The minimum number of Workers that the associated TaskGroup requires.void
setNamespaces
(List<@NotBlank @Namespace String> namespaces) Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on nodes from worker pools in the specified namespaces.void
setProviders
(List<@NotNull CloudProvider> providers) Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on the specified providers.void
setRam
(DoubleRange ram) Range constraint on GB of RAM that are required to execute tasksvoid
setRegions
(List<@NotBlank String> regions) Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup in the specified regions.void
setTasksPerWorker
(Integer tasksPerWorker) Determines the number of worker claims based on splitting the number of unfinished tasks across workers.void
setTaskTimeout
(Duration taskTimeout) The maximum time that a worker should attempt to execute a task for before failing it.void
setTaskTypes
(List<@NotBlank String> taskTypes) The task types that will be used in the associated TaskGroup.void
setVcpus
(DoubleRange vcpus) Range constraint on number of vCPUs that are required to execute tasksvoid
setWorkerTags
(List<@NotBlank @Size(max=200) String> workerTags) Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on workers with a matching tag value.toString()
-
Method Details
-
builder
-
toBuilder
-
getInstanceTypes
-
getVcpus
Range constraint on number of vCPUs that are required to execute tasks- Returns:
- range constraint on required number of vCPUs
-
getRam
Range constraint on GB of RAM that are required to execute tasks- Returns:
- range constraint on GB of RAM
-
getTaskTypes
-
getMinWorkers
The minimum number of Workers that the associated TaskGroup requires. This many workers must be claimed before the associated TaskGroup will start running.- Returns:
- defines the minimum number of Workers required
-
getMaxWorkers
The maximum number of Workers that can be claimed for the associated TaskGroup.- Returns:
- defines the maximum number of Workers that can be claimed
-
getTasksPerWorker
Determines the number of worker claims based on splitting the number of unfinished tasks across workers.- Returns:
- how many unfinished tasks per worker to determine the number of worker claims
-
getExclusiveWorkers
If true, then do not allow claimed Workers to be shared with other task groups; otherwise, Workers can be shared.- Returns:
- if true, then do not allow claimed Workers to be shared with other task groups; otherwise, Workers can be shared
-
getMaximumTaskRetries
public int getMaximumTaskRetries()The maximum number of times a task can be retried after it has failed.- Returns:
- the maximum number of times a task can be retried after it has failed
-
getTaskTimeout
The maximum time that a worker should attempt to execute a task for before failing it. NB: This value can be overridden on individual tasks when they are added.- Returns:
- the maximum time that a worker should attempt to execute a task for before failing it
-
getProviders
Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on the specified providers.- Returns:
- the providers on which tasks can be executed
-
getRegions
-
getWorkerTags
-
getNamespaces
Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on nodes from worker pools in the specified namespaces.- Returns:
- the namespaces
-
setInstanceTypes
-
setVcpus
Range constraint on number of vCPUs that are required to execute tasks- Parameters:
vcpus
- range constraint on required number of vCPUs
-
setRam
Range constraint on GB of RAM that are required to execute tasks- Parameters:
ram
- range constraint on GB of RAM
-
setTaskTypes
-
setMinWorkers
The minimum number of Workers that the associated TaskGroup requires. This many workers must be claimed before the associated TaskGroup will start running.- Parameters:
minWorkers
- defines the minimum number of Workers required
-
setMaxWorkers
The maximum number of Workers that can be claimed for the associated TaskGroup.- Parameters:
maxWorkers
- defines the maximum number of Workers that can be claimed
-
setTasksPerWorker
Determines the number of worker claims based on splitting the number of unfinished tasks across workers.- Parameters:
tasksPerWorker
- how many unfinished tasks per worker to determine the number of worker claims
-
setExclusiveWorkers
If true, then do not allow claimed Workers to be shared with other task groups; otherwise, Workers can be shared.- Parameters:
exclusiveWorkers
- if true, then do not allow claimed Workers to be shared with other task groups; otherwise, Workers can be shared
-
setMaximumTaskRetries
public void setMaximumTaskRetries(int maximumTaskRetries) The maximum number of times a task can be retried after it has failed.- Parameters:
maximumTaskRetries
- the maximum number of times a task can be retried after it has failed
-
setTaskTimeout
The maximum time that a worker should attempt to execute a task for before failing it. NB: This value can be overridden on individual tasks when they are added.- Parameters:
taskTimeout
- the maximum time that a worker should attempt to execute a task for before failing it
-
setProviders
Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on the specified providers.- Parameters:
providers
- the providers on which tasks can be executed
-
setRegions
-
setWorkerTags
-
setNamespaces
Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on nodes from worker pools in the specified namespaces.- Parameters:
workerTags
- the namespaces
-
equals
-
canEqual
-
hashCode
-
toString
-