Class SparkBatchClient

java.lang.Object
com.azure.analytics.synapse.spark.SparkBatchClient

public final class SparkBatchClient extends Object
Initializes a new instance of the synchronous SparkClient type.
  • Method Details

    • getSparkBatchJobs

      public SparkBatchJobCollection getSparkBatchJobs(Integer from, Integer size, Boolean detailed)
      List all spark batch jobs which are running under a particular spark pool.
      Parameters:
      from - Optional param specifying which index the list should begin from.
      size - Optional param specifying the size of the returned list. By default it is 20 and that is the maximum.
      detailed - Optional query param specifying whether detailed response is returned beyond plain livy.
      Returns:
      response for batch list operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getSparkBatchJobs

      public SparkBatchJobCollection getSparkBatchJobs()
      List all spark batch jobs which are running under a particular spark pool.
      Returns:
      response for batch list operation.
      Throws:
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getSparkBatchJobsWithResponse

      public Response<SparkBatchJobCollection> getSparkBatchJobsWithResponse(Integer from, Integer size, Boolean detailed, Context context)
      List all spark batch jobs which are running under a particular spark pool.
      Parameters:
      from - Optional param specifying which index the list should begin from.
      size - Optional param specifying the size of the returned list. By default it is 20 and that is the maximum.
      detailed - Optional query param specifying whether detailed response is returned beyond plain livy.
      context - The context to associate with this operation.
      Returns:
      response for batch list operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createSparkBatchJob

      public SparkBatchJob createSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions, Boolean detailed)
      Create new spark batch job.
      Parameters:
      sparkBatchJobOptions - Livy compatible batch job request payload.
      detailed - Optional query param specifying whether detailed response is returned beyond plain livy.
      Returns:
      the response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createSparkBatchJob

      public SparkBatchJob createSparkBatchJob(SparkBatchJobOptions sparkBatchJobOptions)
      Create new spark batch job.
      Parameters:
      sparkBatchJobOptions - Livy compatible batch job request payload.
      Returns:
      the response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • createSparkBatchJobWithResponse

      public Response<SparkBatchJob> createSparkBatchJobWithResponse(SparkBatchJobOptions sparkBatchJobOptions, Boolean detailed, Context context)
      Create new spark batch job.
      Parameters:
      sparkBatchJobOptions - Livy compatible batch job request payload.
      detailed - Optional query param specifying whether detailed response is returned beyond plain livy.
      context - The context to associate with this operation.
      Returns:
      the response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getSparkBatchJob

      public SparkBatchJob getSparkBatchJob(int batchId, Boolean detailed)
      Gets a single spark batch job.
      Parameters:
      batchId - Identifier for the batch job.
      detailed - Optional query param specifying whether detailed response is returned beyond plain livy.
      Returns:
      a single spark batch job.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getSparkBatchJob

      public SparkBatchJob getSparkBatchJob(int batchId)
      Gets a single spark batch job.
      Parameters:
      batchId - Identifier for the batch job.
      Returns:
      a single spark batch job.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getSparkBatchJobWithResponse

      public Response<SparkBatchJob> getSparkBatchJobWithResponse(int batchId, Boolean detailed, Context context)
      Gets a single spark batch job.
      Parameters:
      batchId - Identifier for the batch job.
      detailed - Optional query param specifying whether detailed response is returned beyond plain livy.
      context - The context to associate with this operation.
      Returns:
      a single spark batch job.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • cancelSparkBatchJob

      public void cancelSparkBatchJob(int batchId)
      Cancels a running spark batch job.
      Parameters:
      batchId - Identifier for the batch job.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • cancelSparkBatchJobWithResponse

      public Response<Void> cancelSparkBatchJobWithResponse(int batchId, Context context)
      Cancels a running spark batch job.
      Parameters:
      batchId - Identifier for the batch job.
      context - The context to associate with this operation.
      Returns:
      the response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.