Package com.netflix.genie.common.dto
Class JobRequest.Builder
java.lang.Object
com.netflix.genie.common.dto.BaseDTO.Builder<T>
com.netflix.genie.common.dto.CommonDTO.Builder<T>
com.netflix.genie.common.dto.ExecutionEnvironmentDTO.Builder<JobRequest.Builder>
com.netflix.genie.common.dto.JobRequest.Builder
- Enclosing class:
- JobRequest
A builder to create job requests.
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(String name, String user, String version, String commandArgs, List<ClusterCriteria> clusterCriterias, Set<String> commandCriteria) Deprecated.Builder(String name, String user, String version, List<ClusterCriteria> clusterCriterias, Set<String> commandCriteria) Constructor which has required fields. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the job request.withApplications(List<String> applications) Set the ids of applications to override the default applications from the command with.withCommandArgs(String commandArgs) Deprecated.withCommandArgs(List<String> commandArgs) The command arguments to use in conjunction with the command executable selected for this job.Deprecated.UsewithRuntime(Runtime)insteadwithDisableLogArchival(boolean disableLogArchival) Set whether to disable log archive for the job.Set the email to use for alerting of job completion.Set the group for 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.withMemory(Integer memory) Deprecated.UsewithRuntime(Runtime)insteadwithRuntime(Runtime runtime) Set the requested job runtime environment details.withTimeout(Integer timeout) Set the length of the job timeout in seconds after which Genie will kill the client process.Methods inherited from class com.netflix.genie.common.dto.ExecutionEnvironmentDTO.Builder
withConfigs, withDependencies, withSetupFileMethods inherited from class com.netflix.genie.common.dto.CommonDTO.Builder
withDescription, withMetadata, withMetadata, withTagsMethods inherited from class com.netflix.genie.common.dto.BaseDTO.Builder
withCreated, withId, withUpdated
-
Constructor Details
-
Builder
public Builder(String name, String user, String version, List<ClusterCriteria> clusterCriterias, Set<String> commandCriteria) 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 JobclusterCriterias- The list of cluster criteria for the JobcommandCriteria- The list of command criteria for the Job- Since:
- 3.3.0
-
Builder
@Deprecated public Builder(String name, String user, String version, @Nullable String commandArgs, List<ClusterCriteria> clusterCriterias, Set<String> commandCriteria) Deprecated.Constructor which has required fields.DEPRECATED: Will be removed in 4.0.0 as command args are optional and should be a List now
- 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 line arguments for the JobclusterCriterias- The list of cluster criteria for the JobcommandCriteria- The list of command criteria for the Job
-
-
Method Details
-
withCommandArgs
Deprecated.The command arguments to use in conjunction witOh 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. 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 length of the command args plus one space between each argument must be less than or equal to 10,000 characters- Returns:
- The builder
- Since:
- 3.3.0
-
withGroup
Set the group for the job.- Parameters:
group- The group- Returns:
- The builder
-
withDisableLogArchival
Set whether to disable log archive for the job.- Parameters:
disableLogArchival- true if you want to disable log archival- Returns:
- The builder
-
withEmail
Set the email to use for alerting of job completion. If no alert desired leave blank.- Parameters:
email- the email address to use- Returns:
- The builder
-
withCpu
Deprecated.UsewithRuntime(Runtime)insteadSet the number of cpu's being requested to run the job. Defaults to 1 if not set.- Parameters:
cpu- The number of cpu's. Must be greater than 0.- Returns:
- The builder
-
withMemory
Deprecated.UsewithRuntime(Runtime)insteadSet the amount of memory being requested to run the job.- Parameters:
memory- The amount of memory in terms of MB's. Must be greater than 0.- Returns:
- The builder
-
withApplications
Set the ids of applications to override the default applications from the command with.- Parameters:
applications- The ids of applications to override- Returns:
- The builder
-
withTimeout
Set the length of the job timeout in seconds after which Genie will kill the client process.- Parameters:
timeout- The timeout to use- 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
-
withRuntime
Set the requested job runtime environment details.- Parameters:
runtime- TheRuntimeinformation or null- Returns:
- The
JobRequest.Builderinstance
-
build
Build the job request.- Returns:
- Create the final read-only JobRequest instance
-
Builder(String, String, String, List, Set)