Class SparkBatchAsyncClient

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

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

    • getSparkBatchJobsWithResponse

      public Mono<Response<SparkBatchJobCollection>> getSparkBatchJobsWithResponse(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 Mono<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 Mono<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.
    • createSparkBatchJobWithResponse

      public Mono<Response<SparkBatchJob>> createSparkBatchJobWithResponse(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 Mono<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 Mono<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.
    • getSparkBatchJobWithResponse

      public Mono<Response<SparkBatchJob>> getSparkBatchJobWithResponse(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 Mono<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 Mono<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.
    • cancelSparkBatchJobWithResponse

      public Mono<Response<Void>> cancelSparkBatchJobWithResponse(int batchId)
      Cancels a running spark batch job.
      Parameters:
      batchId - Identifier for the batch job.
      Returns:
      the completion.
      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 Mono<Void> cancelSparkBatchJob(int batchId)
      Cancels a running spark batch job.
      Parameters:
      batchId - Identifier for the batch job.
      Returns:
      the completion.
      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.