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 classA builder that can be used to build a new RunSpecification that is automatically validated on build. -
Method Summary
Modifier and TypeMethodDescriptionstatic RunSpecification.Builderbuilder()protected booleanbooleanIf 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 tasksintThe 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.Defines the errors that should result in a task retrying if encountered.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.inthashCode()voidsetExclusiveWorkers(Boolean exclusiveWorkers) If true, then do not allow claimed Workers to be shared with other task groups; otherwise, Workers can be shared.voidsetInstanceTypes(List<@NotBlank String> instanceTypes) The machine instance types that can be used to execute tasksvoidsetMaximumTaskRetries(int maximumTaskRetries) The maximum number of times a task can be retried after it has failed.voidsetMaxWorkers(Integer maxWorkers) The maximum number of Workers that can be claimed for the associated TaskGroup.voidsetMinWorkers(Integer minWorkers) The minimum number of Workers that the associated TaskGroup requires.voidsetNamespaces(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.voidsetProviders(List<@NotNull CloudProvider> providers) Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup on the specified providers.voidsetRam(DoubleRange ram) Range constraint on GB of RAM that are required to execute tasksvoidsetRegions(List<@NotBlank String> regions) Constrains the YellowDog Scheduler to only execute tasks from the associated TaskGroup in the specified regions.voidsetRetryableErrors(List<TaskErrorMatcher> retryableErrors) Defines the errors that should result in a task retrying if encountered.voidsetTasksPerWorker(Integer tasksPerWorker) Determines the number of worker claims based on splitting the number of unfinished tasks across workers.voidsetTaskTimeout(Duration taskTimeout) The maximum time that a worker should attempt to execute a task for before failing it.voidsetTaskTypes(List<@NotBlank String> taskTypes) The task types that will be used in the associated TaskGroup.voidsetVcpus(DoubleRange vcpus) Range constraint on number of vCPUs that are required to execute tasksvoidsetWorkerTags(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
-
getRetryableErrors
Defines the errors that should result in a task retrying if encountered.- Returns:
- the list of task error matchers
-
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
-
setRetryableErrors
Defines the errors that should result in a task retrying if encountered.- Parameters:
retryableErrors- the list of task error matchers
-
equals
-
canEqual
-
hashCode
-
toString
-