All Implemented Interfaces:
com.azure.json.JsonSerializable<ResourceBase>

public final class SparkJob extends JobBaseProperties
Spark job definition.
  • Constructor Details

    • SparkJob

      public SparkJob()
      Creates an instance of SparkJob class.
  • Method Details

    • jobType

      public JobType jobType()
      Get the jobType property: [Required] Specifies the type of job.
      Overrides:
      jobType in class JobBaseProperties
      Returns:
      the jobType value.
    • resources

      public SparkResourceConfiguration resources()
      Get the resources property: Compute Resource configuration for the job.
      Returns:
      the resources value.
    • withResources

      public SparkJob withResources(SparkResourceConfiguration resources)
      Set the resources property: Compute Resource configuration for the job.
      Parameters:
      resources - the resources value to set.
      Returns:
      the SparkJob object itself.
    • args

      public String args()
      Get the args property: Arguments for the job.
      Returns:
      the args value.
    • withArgs

      public SparkJob withArgs(String args)
      Set the args property: Arguments for the job.
      Parameters:
      args - the args value to set.
      Returns:
      the SparkJob object itself.
    • codeId

      public String codeId()
      Get the codeId property: [Required] arm-id of the code asset.
      Returns:
      the codeId value.
    • withCodeId

      public SparkJob withCodeId(String codeId)
      Set the codeId property: [Required] arm-id of the code asset.
      Parameters:
      codeId - the codeId value to set.
      Returns:
      the SparkJob object itself.
    • entry

      public SparkJobEntry entry()
      Get the entry property: [Required] The entry to execute on startup of the job.
      Returns:
      the entry value.
    • withEntry

      public SparkJob withEntry(SparkJobEntry entry)
      Set the entry property: [Required] The entry to execute on startup of the job.
      Parameters:
      entry - the entry value to set.
      Returns:
      the SparkJob object itself.
    • environmentId

      public String environmentId()
      Get the environmentId property: The ARM resource ID of the Environment specification for the job.
      Returns:
      the environmentId value.
    • withEnvironmentId

      public SparkJob withEnvironmentId(String environmentId)
      Set the environmentId property: The ARM resource ID of the Environment specification for the job.
      Parameters:
      environmentId - the environmentId value to set.
      Returns:
      the SparkJob object itself.
    • inputs

      public Map<String,JobInput> inputs()
      Get the inputs property: Mapping of input data bindings used in the job.
      Returns:
      the inputs value.
    • withInputs

      public SparkJob withInputs(Map<String,JobInput> inputs)
      Set the inputs property: Mapping of input data bindings used in the job.
      Parameters:
      inputs - the inputs value to set.
      Returns:
      the SparkJob object itself.
    • outputs

      public Map<String,JobOutput> outputs()
      Get the outputs property: Mapping of output data bindings used in the job.
      Returns:
      the outputs value.
    • withOutputs

      public SparkJob withOutputs(Map<String,JobOutput> outputs)
      Set the outputs property: Mapping of output data bindings used in the job.
      Parameters:
      outputs - the outputs value to set.
      Returns:
      the SparkJob object itself.
    • pyFiles

      public List<String> pyFiles()
      Get the pyFiles property: Python files used in the job.
      Returns:
      the pyFiles value.
    • withPyFiles

      public SparkJob withPyFiles(List<String> pyFiles)
      Set the pyFiles property: Python files used in the job.
      Parameters:
      pyFiles - the pyFiles value to set.
      Returns:
      the SparkJob object itself.
    • jars

      public List<String> jars()
      Get the jars property: Jar files used in the job.
      Returns:
      the jars value.
    • withJars

      public SparkJob withJars(List<String> jars)
      Set the jars property: Jar files used in the job.
      Parameters:
      jars - the jars value to set.
      Returns:
      the SparkJob object itself.
    • files

      public List<String> files()
      Get the files property: Files used in the job.
      Returns:
      the files value.
    • withFiles

      public SparkJob withFiles(List<String> files)
      Set the files property: Files used in the job.
      Parameters:
      files - the files value to set.
      Returns:
      the SparkJob object itself.
    • archives

      public List<String> archives()
      Get the archives property: Archive files used in the job.
      Returns:
      the archives value.
    • withArchives

      public SparkJob withArchives(List<String> archives)
      Set the archives property: Archive files used in the job.
      Parameters:
      archives - the archives value to set.
      Returns:
      the SparkJob object itself.
    • conf

      public Map<String,String> conf()
      Get the conf property: Spark configured properties.
      Returns:
      the conf value.
    • withConf

      public SparkJob withConf(Map<String,String> conf)
      Set the conf property: Spark configured properties.
      Parameters:
      conf - the conf value to set.
      Returns:
      the SparkJob object itself.
    • queueSettings

      public QueueSettings queueSettings()
      Get the queueSettings property: Queue settings for the job.
      Returns:
      the queueSettings value.
    • withQueueSettings

      public SparkJob withQueueSettings(QueueSettings queueSettings)
      Set the queueSettings property: Queue settings for the job.
      Parameters:
      queueSettings - the queueSettings value to set.
      Returns:
      the SparkJob object itself.
    • environmentVariables

      public Map<String,String> environmentVariables()
      Get the environmentVariables property: Environment variables included in the job.
      Returns:
      the environmentVariables value.
    • withEnvironmentVariables

      public SparkJob withEnvironmentVariables(Map<String,String> environmentVariables)
      Set the environmentVariables property: Environment variables included in the job.
      Parameters:
      environmentVariables - the environmentVariables value to set.
      Returns:
      the SparkJob object itself.
    • status

      public JobStatus status()
      Get the status property: Status of the job.
      Overrides:
      status in class JobBaseProperties
      Returns:
      the status value.
    • withDisplayName

      public SparkJob withDisplayName(String displayName)
      Set the displayName property: Display name of job.
      Overrides:
      withDisplayName in class JobBaseProperties
      Parameters:
      displayName - the displayName value to set.
      Returns:
      the JobBaseProperties object itself.
    • withExperimentName

      public SparkJob withExperimentName(String experimentName)
      Set the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment.
      Overrides:
      withExperimentName in class JobBaseProperties
      Parameters:
      experimentName - the experimentName value to set.
      Returns:
      the JobBaseProperties object itself.
    • withServices

      public SparkJob withServices(Map<String,JobService> services)
      Set the services property: List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject.
      Overrides:
      withServices in class JobBaseProperties
      Parameters:
      services - the services value to set.
      Returns:
      the JobBaseProperties object itself.
    • withComputeId

      public SparkJob withComputeId(String computeId)
      Set the computeId property: ARM resource ID of the compute resource.
      Overrides:
      withComputeId in class JobBaseProperties
      Parameters:
      computeId - the computeId value to set.
      Returns:
      the JobBaseProperties object itself.
    • withIsArchived

      public SparkJob withIsArchived(Boolean isArchived)
      Set the isArchived property: Is the asset archived?.
      Overrides:
      withIsArchived in class JobBaseProperties
      Parameters:
      isArchived - the isArchived value to set.
      Returns:
      the JobBaseProperties object itself.
    • withIdentity

      public SparkJob withIdentity(IdentityConfiguration identity)
      Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken if null.
      Overrides:
      withIdentity in class JobBaseProperties
      Parameters:
      identity - the identity value to set.
      Returns:
      the JobBaseProperties object itself.
    • withComponentId

      public SparkJob withComponentId(String componentId)
      Set the componentId property: ARM resource ID of the component resource.
      Overrides:
      withComponentId in class JobBaseProperties
      Parameters:
      componentId - the componentId value to set.
      Returns:
      the JobBaseProperties object itself.
    • withNotificationSetting

      public SparkJob withNotificationSetting(NotificationSetting notificationSetting)
      Set the notificationSetting property: Notification setting for the job.
      Overrides:
      withNotificationSetting in class JobBaseProperties
      Parameters:
      notificationSetting - the notificationSetting value to set.
      Returns:
      the JobBaseProperties object itself.
    • withDescription

      public SparkJob withDescription(String description)
      Set the description property: The asset description text.
      Overrides:
      withDescription in class JobBaseProperties
      Parameters:
      description - the description value to set.
      Returns:
      the ResourceBase object itself.
    • withTags

      public SparkJob withTags(Map<String,String> tags)
      Set the tags property: Tag dictionary. Tags can be added, removed, and updated.
      Overrides:
      withTags in class JobBaseProperties
      Parameters:
      tags - the tags value to set.
      Returns:
      the ResourceBase object itself.
    • withProperties

      public SparkJob withProperties(Map<String,String> properties)
      Set the properties property: The asset property dictionary.
      Overrides:
      withProperties in class JobBaseProperties
      Parameters:
      properties - the properties value to set.
      Returns:
      the ResourceBase object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class JobBaseProperties
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ResourceBase>
      Overrides:
      toJson in class JobBaseProperties
      Throws:
      IOException
    • fromJson

      public static SparkJob fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SparkJob from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SparkJob if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the SparkJob.