Class JobSpecification
java.lang.Object
com.netflix.genie.common.internal.dtos.JobSpecification
- All Implemented Interfaces:
Serializable
This DTO represents all the information needed to execute a job by the Genie Agent.
- Since:
- 4.0.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Common representation of resources used for job execution e.g. -
Constructor Summary
ConstructorDescriptionJobSpecification
(List<String> executableArgs, List<String> jobArgs, JobSpecification.ExecutionResource job, JobSpecification.ExecutionResource cluster, JobSpecification.ExecutionResource command, List<JobSpecification.ExecutionResource> applications, Map<String, String> environmentVariables, boolean interactive, File jobDirectoryLocation, String archiveLocation, Integer timeout) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns an unmodifiable list of applications.Get the archive location for the job folder.Get the environment variables dictated by the server that should be set in the job execution environment.Returns an unmodifiable list of executable and arguments provided by the Command resolved to.Returns an unmodifiable list of arguments provided by the user for this job.Get the job timeout.
-
Constructor Details
-
JobSpecification
public JobSpecification(@Nullable List<String> executableArgs, @Nullable List<String> jobArgs, JobSpecification.ExecutionResource job, JobSpecification.ExecutionResource cluster, JobSpecification.ExecutionResource command, @Nullable List<JobSpecification.ExecutionResource> applications, @Nullable Map<String, String> environmentVariables, boolean interactive, File jobDirectoryLocation, @Nullable String archiveLocation, @Nullable Integer timeout) Constructor.- Parameters:
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. Optional
-
-
Method Details
-
getExecutableArgs
Returns an unmodifiable list of executable and arguments provided by the Command resolved to.- Returns:
- A list of executable and arguments that will throw exception if modifications are attempted
-
getJobArgs
Returns an unmodifiable list of arguments provided by the user for this job.- Returns:
- A list of arguments that will throw exception if modifications are attempted
-
getApplications
Returns an unmodifiable list of applications.- Returns:
- A list of Applications that will throw exception if modifications are attempted
-
getEnvironmentVariables
Get the environment variables dictated by the server that should be set in the job execution environment.- Returns:
- The variable name to value pairs that should be set in the execution environment of the job. This map will be immutable and any attempt to modify will result in an exception
-
getArchiveLocation
Get the archive location for the job folder.- Returns:
- archive location for the job folder wrapped in an
Optional
-
getTimeout
Get the job timeout.- Returns:
- The number of seconds after a job launch that this job should be killed by the agent due to timeout.
Wrapped in
Optional
as it's not required.Optional.empty()
means there is no timeout and the job can run indefinitely.
-