public class JobSpecification
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JobSpecification.ExecutionResource
Common representation of resources used for job execution e.g.
|
| Constructor and Description |
|---|
JobSpecification(java.util.List<java.lang.String> executableArgs,
java.util.List<java.lang.String> jobArgs,
JobSpecification.ExecutionResource job,
JobSpecification.ExecutionResource cluster,
JobSpecification.ExecutionResource command,
java.util.List<JobSpecification.ExecutionResource> applications,
java.util.Map<java.lang.String,java.lang.String> environmentVariables,
boolean interactive,
java.io.File jobDirectoryLocation,
java.lang.String archiveLocation,
java.lang.Integer timeout)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<JobSpecification.ExecutionResource> |
getApplications()
Returns an unmodifiable list of applications.
|
java.util.Optional<java.lang.String> |
getArchiveLocation()
Get the archive location for the job folder.
|
java.util.Map<java.lang.String,java.lang.String> |
getEnvironmentVariables()
Get the environment variables dictated by the server that should be set in the job execution environment.
|
java.util.List<java.lang.String> |
getExecutableArgs()
Returns an unmodifiable list of executable and arguments provided by the Command resolved to.
|
java.util.List<java.lang.String> |
getJobArgs()
Returns an unmodifiable list of arguments provided by the user for this job.
|
java.util.Optional<java.lang.Integer> |
getTimeout()
Get the job timeout.
|
public JobSpecification(@Nullable
java.util.List<java.lang.String> executableArgs,
@Nullable
java.util.List<java.lang.String> jobArgs,
JobSpecification.ExecutionResource job,
JobSpecification.ExecutionResource cluster,
JobSpecification.ExecutionResource command,
@Nullable
java.util.List<JobSpecification.ExecutionResource> applications,
@Nullable
java.util.Map<java.lang.String,java.lang.String> environmentVariables,
boolean interactive,
java.io.File jobDirectoryLocation,
@Nullable
java.lang.String archiveLocation,
@Nullable
java.lang.Integer timeout)
executableArgs - Executable and its fixed argument provided by the CommandjobArgs - Job arguments provided by the user for this jobjob - The execution resources for a specific jobcluster - The execution resources for a specific cluster used for a jobcommand - The execution resources for a specific command used for a jobapplications - The execution resources of all applications used for a job. OptionalenvironmentVariables - The environment variables the agent should set when running the job. Optionalinteractive - Whether the job is interactive or notjobDirectoryLocation - Location on disk where the job directory will be createdarchiveLocation - Location where job folder is archived by the agent when job finishes. Optionaltimeout - The number of seconds after a job starts that it should be killed due to timeout.
Optionalpublic java.util.List<java.lang.String> getExecutableArgs()
public java.util.List<java.lang.String> getJobArgs()
public java.util.List<JobSpecification.ExecutionResource> getApplications()
public java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
public java.util.Optional<java.lang.String> getArchiveLocation()
Optionalpublic java.util.Optional<java.lang.Integer> getTimeout()
Optional as it's not required. Optional.empty() means there is no timeout and the job
can run indefinitely.