public static class JobRequest.Builder extends SetupFileDTO.Builder<JobRequest.Builder>
Constructor and Description |
---|
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)
Constructor which has required fields.
|
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 |
withCpu(java.lang.Integer cpu)
Set the number of cpu's being requested to run the job.
|
JobRequest.Builder |
withDependencies(java.util.Set<java.lang.String> dependencies)
Set the file dependencies needed 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 |
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.
|
withSetupFile
withDescription, withTags
withCreated, withId, withUpdated
public 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)
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 Jobpublic JobRequest.Builder withGroup(java.lang.String group)
group
- The grouppublic JobRequest.Builder withDependencies(java.util.Set<java.lang.String> dependencies)
dependencies
- The file dependenciespublic JobRequest.Builder withDisableLogArchival(boolean disableLogArchival)
disableLogArchival
- true if you want to disable log archivalpublic JobRequest.Builder withEmail(java.lang.String email)
email
- the email address to usepublic JobRequest.Builder withCpu(java.lang.Integer cpu)
cpu
- The number of cpu's. Must be greater than 0.public JobRequest.Builder withMemory(java.lang.Integer memory)
memory
- The amount of memory in terms of MB's. Must be greater than 0.public JobRequest.Builder withApplications(java.util.List<java.lang.String> applications)
applications
- The ids of applications to overridepublic JobRequest.Builder withTimeout(java.lang.Integer timeout)
timeout
- The timeout to usepublic JobRequest build()