Class JobRequest

java.lang.Object
com.netflix.genie.common.internal.dtos.JobRequest
All Implemented Interfaces:
AgentJobRequest, ApiJobRequest, CommonRequest, Serializable

public class JobRequest extends Object implements AgentJobRequest, ApiJobRequest
All details a user will provide to Genie in order to run a job.
Since:
4.0.0
See Also:
  • Constructor Details

    • JobRequest

      public JobRequest(@Nullable String requestedId, @Nullable ExecutionEnvironment resources, @Nullable List<String> commandArgs, JobMetadata metadata, ExecutionResourceCriteria criteria, @Nullable JobEnvironmentRequest requestedJobEnvironment, @Nullable AgentConfigRequest requestedAgentConfig)
      Constructor.
      Parameters:
      requestedId - The requested id of the job if one was provided by the user
      resources - The execution resources (if any) provided by the user
      commandArgs - Any command args provided by the user
      metadata - Any metadata related to the job provided by the user
      criteria - The criteria used by the server to determine execution resources (cluster, command, etc)
      requestedJobEnvironment - The optional job environment request parameters
      requestedAgentConfig - The optional configuration options for the Genie Agent
  • Method Details

    • getCommandArgs

      public List<String> getCommandArgs()
      Get the command arguments a user has requested be appended to a command executable for their job.
      Specified by:
      getCommandArgs in interface AgentJobRequest
      Specified by:
      getCommandArgs in interface ApiJobRequest
      Returns:
      The command arguments as an immutable list. Any attempt to modify will throw exception
    • getRequestedId

      public Optional<String> getRequestedId()
      Get the ID the user has requested for this resource if one was added.
      Specified by:
      getRequestedId in interface CommonRequest
      Returns:
      The ID wrapped in an Optional