Class JobSpecification

java.lang.Object
com.netflix.genie.common.internal.dtos.JobSpecification
All Implemented Interfaces:
Serializable

public class JobSpecification extends Object implements Serializable
This DTO represents all the information needed to execute a job by the Genie Agent.
Since:
4.0.0
See Also:
  • 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 Command
      jobArgs - Job arguments provided by the user for this job
      job - The execution resources for a specific job
      cluster - The execution resources for a specific cluster used for a job
      command - The execution resources for a specific command used for a job
      applications - The execution resources of all applications used for a job. Optional
      environmentVariables - The environment variables the agent should set when running the job. Optional
      interactive - Whether the job is interactive or not
      jobDirectoryLocation - Location on disk where the job directory will be created
      archiveLocation - Location where job folder is archived by the agent when job finishes. Optional
      timeout - The number of seconds after a job starts that it should be killed due to timeout. Optional
  • Method Details

    • getExecutableArgs

      public List<String> 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

      public List<String> 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

      public List<JobSpecification.ExecutionResource> getApplications()
      Returns an unmodifiable list of applications.
      Returns:
      A list of Applications that will throw exception if modifications are attempted
    • getEnvironmentVariables

      public Map<String,String> 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

      public Optional<String> getArchiveLocation()
      Get the archive location for the job folder.
      Returns:
      archive location for the job folder wrapped in an Optional
    • getTimeout

      public Optional<Integer> 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.