Package com.netflix.genie.common.dto
Class Job.Builder
java.lang.Object
com.netflix.genie.common.dto.BaseDTO.Builder<T>
com.netflix.genie.common.dto.CommonDTO.Builder<Job.Builder>
com.netflix.genie.common.dto.Job.Builder
- Enclosing class:
- Job
A builder to create jobs.
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the job.withArchiveLocation
(String archiveLocation) Set the archive location of the job.withClusterName
(String clusterName) Set the execution cluster name for this job.withCommandArgs
(String commandArgs) Deprecated.withCommandArgs
(List<String> commandArgs) The command arguments to use in conjunction with the command executable selected for this job.withCommandName
(String commandName) Set the name of the command used to run this job.withFinished
(Instant finished) Set the finished time of the job.withGrouping
(String grouping) Set the grouping to use for this job.withGroupingInstance
(String groupingInstance) Set the grouping instance to use for this job.withStarted
(Instant started) Set the started time of the job.withStatus
(JobStatus status) Set the status of the job.withStatusMsg
(String statusMsg) Set the detailed status message of the job.Methods inherited from class com.netflix.genie.common.dto.CommonDTO.Builder
withDescription, withMetadata, withMetadata, withTags
Methods inherited from class com.netflix.genie.common.dto.BaseDTO.Builder
withCreated, withId, withUpdated
-
Constructor Details
-
Builder
Constructor which has required fields.- Parameters:
name
- The name to use for the Jobuser
- The user to use for the Jobversion
- The version to use for the Job- Since:
- 3.3.0
-
Builder
Deprecated.Constructor which has required fields.Deprecated: Command args is optional. Use new constructor. Will be removed in 4.0.0
- Parameters:
name
- The name to use for the Jobuser
- The user to use for the Jobversion
- The version to use for the JobcommandArgs
- The command arguments used for this job. Max length 10,000 characters- See Also:
-
-
Method Details
-
withCommandArgs
Deprecated.The command arguments to use in conjunction with the command executable selected for this job.DEPRECATED: This API will be removed in 4.0.0 in favor of the List based method for improved control over escaping of arguments.
- Parameters:
commandArgs
- The command args. The max length is 10,000 characters- Returns:
- The builder
- Since:
- 3.3.0
-
withCommandArgs
The command arguments to use in conjunction with the command executable selected for this job.- Parameters:
commandArgs
- The command args. The maximum combined size of the command args plus 1 space character between each argument must be less than or equal to 10,000 characters- Returns:
- The builder
- Since:
- 3.3.0
-
withClusterName
Set the execution cluster name for this job.- Parameters:
clusterName
- The execution cluster name- Returns:
- The builder
-
withCommandName
Set the name of the command used to run this job.- Parameters:
commandName
- The name of the command- Returns:
- The builder
-
withStatus
Set the status of the job.- Parameters:
status
- The status- Returns:
- The builder
- See Also:
-
withStatusMsg
Set the detailed status message of the job.- Parameters:
statusMsg
- The status message- Returns:
- The builder
-
withStarted
Set the started time of the job.- Parameters:
started
- The started time of the job- Returns:
- The builder
-
withFinished
Set the finished time of the job.- Parameters:
finished
- The time the job finished- Returns:
- The builder
-
withArchiveLocation
Set the archive location of the job.- Parameters:
archiveLocation
- The location where the job results are archived- Returns:
- The builder
-
withGrouping
Set the grouping to use for this job.- Parameters:
grouping
- The grouping- Returns:
- The builder
- Since:
- 3.3.0
-
withGroupingInstance
Set the grouping instance to use for this job.- Parameters:
groupingInstance
- The grouping instance- Returns:
- The builder
- Since:
- 3.3.0
-
build
Build the job.- Returns:
- Create the final read-only Job instance
-
withCommandArgs(List)