public static class JobRequest.Builder extends ExecutionEnvironmentDTO.Builder<JobRequest.Builder>
| Constructor and Description |
|---|
Builder(java.lang.String name,
java.lang.String user,
java.lang.String version,
java.util.List<ClusterCriteria> clusterCriterias,
java.util.Set<java.lang.String> commandCriteria)
Constructor which has required fields.
|
Builder(java.lang.String name,
java.lang.String user,
java.lang.String version,
java.lang.String commandArgs,
java.util.List<ClusterCriteria> clusterCriterias,
java.util.Set<java.lang.String> commandCriteria)
Deprecated.
Use
#Builder(String, String, String, List, Set) |
| Modifier and Type | Method and Description |
|---|---|
JobRequest |
build()
Build the job request.
|
JobRequest.Builder |
withApplications(java.util.List<java.lang.String> applications)
Set the ids of applications to override the default applications from the command with.
|
JobRequest.Builder |
withCommandArgs(java.util.List<java.lang.String> commandArgs)
The command arguments to use in conjunction with the command executable selected for this job.
|
JobRequest.Builder |
withCommandArgs(java.lang.String commandArgs)
Deprecated.
|
JobRequest.Builder |
withCpu(java.lang.Integer cpu)
Set the number of cpu's being requested to run the job.
|
JobRequest.Builder |
withDisableLogArchival(boolean disableLogArchival)
Set whether to disable log archive for the job.
|
JobRequest.Builder |
withEmail(java.lang.String email)
Set the email to use for alerting of job completion.
|
JobRequest.Builder |
withGroup(java.lang.String group)
Set the group for the job.
|
JobRequest.Builder |
withGrouping(java.lang.String grouping)
Set the grouping to use for this job.
|
JobRequest.Builder |
withGroupingInstance(java.lang.String groupingInstance)
Set the grouping instance to use for this job.
|
JobRequest.Builder |
withMemory(java.lang.Integer memory)
Set the amount of memory being requested to run the job..
|
JobRequest.Builder |
withTimeout(java.lang.Integer timeout)
Set the length of the job timeout in seconds after which Genie will kill the client process.
|
withConfigs, withDependencies, withSetupFilewithDescription, withMetadata, withMetadata, withTagswithCreated, withId, withUpdatedpublic Builder(java.lang.String name,
java.lang.String user,
java.lang.String version,
java.util.List<ClusterCriteria> clusterCriterias,
java.util.Set<java.lang.String> commandCriteria)
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@Deprecated
public Builder(java.lang.String name,
java.lang.String user,
java.lang.String version,
@Nullable
java.lang.String commandArgs,
java.util.List<ClusterCriteria> clusterCriterias,
java.util.Set<java.lang.String> commandCriteria)
#Builder(String, String, String, List, Set)DEPRECATED: Will be removed in 4.0.0 as command args are optional and should be a List now
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@Deprecated public JobRequest.Builder withCommandArgs(@Nullable java.lang.String commandArgs)
withCommandArgs(List)DEPRECATED: This API will be removed in 4.0.0 in favor of the List based method for improved control over escaping of arguments.
commandArgs - The command args. Max length is 10,000 characterspublic JobRequest.Builder withCommandArgs(@Nullable java.util.List<java.lang.String> commandArgs)
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 characterspublic JobRequest.Builder withGroup(@Nullable java.lang.String group)
group - The grouppublic JobRequest.Builder withDisableLogArchival(boolean disableLogArchival)
disableLogArchival - true if you want to disable log archivalpublic JobRequest.Builder withEmail(@Nullable java.lang.String email)
email - the email address to usepublic JobRequest.Builder withCpu(@Nullable java.lang.Integer cpu)
cpu - The number of cpu's. Must be greater than 0.public JobRequest.Builder withMemory(@Nullable java.lang.Integer memory)
memory - The amount of memory in terms of MB's. Must be greater than 0.public JobRequest.Builder withApplications(@Nullable java.util.List<java.lang.String> applications)
applications - The ids of applications to overridepublic JobRequest.Builder withTimeout(@Nullable java.lang.Integer timeout)
timeout - The timeout to usepublic JobRequest.Builder withGrouping(@Nullable java.lang.String grouping)
grouping - The groupingpublic JobRequest.Builder withGroupingInstance(@Nullable java.lang.String groupingInstance)
groupingInstance - The grouping instancepublic JobRequest build()