Class SparkSessionAsyncClient
java.lang.Object
com.azure.analytics.synapse.spark.SparkSessionAsyncClient
Initializes a new instance of the asynchronous SparkClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncancelSparkSession
(int sessionId) Cancels a running spark session.cancelSparkSessionWithResponse
(int sessionId) Cancels a running spark session.cancelSparkStatement
(int sessionId, int statementId) Kill a statement within a session.cancelSparkStatementWithResponse
(int sessionId, int statementId) Kill a statement within a session.createSparkSession
(SparkSessionOptions sparkSessionOptions) Create new spark session.createSparkSession
(SparkSessionOptions sparkSessionOptions, Boolean detailed) Create new spark session.createSparkSessionWithResponse
(SparkSessionOptions sparkSessionOptions, Boolean detailed) Create new spark session.createSparkStatement
(int sessionId, SparkStatementOptions sparkStatementOptions) Create statement within a spark session.createSparkStatementWithResponse
(int sessionId, SparkStatementOptions sparkStatementOptions) Create statement within a spark session.getSparkSession
(int sessionId) Gets a single spark session.getSparkSession
(int sessionId, Boolean detailed) Gets a single spark session.List all spark sessions which are running under a particular spark pool.getSparkSessions
(Integer from, Integer size, Boolean detailed) List all spark sessions which are running under a particular spark pool.getSparkSessionsWithResponse
(Integer from, Integer size, Boolean detailed) List all spark sessions which are running under a particular spark pool.getSparkSessionWithResponse
(int sessionId, Boolean detailed) Gets a single spark session.getSparkStatement
(int sessionId, int statementId) Gets a single statement within a spark session.getSparkStatements
(int sessionId) Gets a list of statements within a spark session.getSparkStatementsWithResponse
(int sessionId) Gets a list of statements within a spark session.getSparkStatementWithResponse
(int sessionId, int statementId) Gets a single statement within a spark session.resetSparkSessionTimeout
(int sessionId) Sends a keep alive call to the current session to reset the session timeout.resetSparkSessionTimeoutWithResponse
(int sessionId) Sends a keep alive call to the current session to reset the session timeout.
-
Method Details
-
getSparkSessionsWithResponse
public Mono<Response<SparkSessionCollection>> getSparkSessionsWithResponse(Integer from, Integer size, Boolean detailed) List all spark sessions 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:
- 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.
-
getSparkSessions
List all spark sessions 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:
- 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.
-
getSparkSessions
List all spark sessions which are running under a particular spark pool.- Returns:
- the response.
- Throws:
HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
createSparkSessionWithResponse
public Mono<Response<SparkSession>> createSparkSessionWithResponse(SparkSessionOptions sparkSessionOptions, Boolean detailed) Create new spark session.- Parameters:
sparkSessionOptions
- 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.
-
createSparkSession
public Mono<SparkSession> createSparkSession(SparkSessionOptions sparkSessionOptions, Boolean detailed) Create new spark session.- Parameters:
sparkSessionOptions
- 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.
-
createSparkSession
Create new spark session.- Parameters:
sparkSessionOptions
- 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.
-
getSparkSessionWithResponse
Gets a single spark session.- Parameters:
sessionId
- Identifier for the session.detailed
- Optional query param specifying whether detailed response is returned beyond plain livy.- Returns:
- a single spark session.
- 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.
-
getSparkSession
Gets a single spark session.- Parameters:
sessionId
- Identifier for the session.detailed
- Optional query param specifying whether detailed response is returned beyond plain livy.- Returns:
- a single spark session.
- 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.
-
getSparkSession
Gets a single spark session.- Parameters:
sessionId
- Identifier for the session.- Returns:
- a single spark session.
- 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.
-
cancelSparkSessionWithResponse
Cancels a running spark session.- Parameters:
sessionId
- Identifier for the session.- 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.
-
cancelSparkSession
Cancels a running spark session.- Parameters:
sessionId
- Identifier for the session.- 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.
-
resetSparkSessionTimeoutWithResponse
Sends a keep alive call to the current session to reset the session timeout.- Parameters:
sessionId
- Identifier for the session.- 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.
-
resetSparkSessionTimeout
Sends a keep alive call to the current session to reset the session timeout.- Parameters:
sessionId
- Identifier for the session.- 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.
-
getSparkStatementsWithResponse
Gets a list of statements within a spark session.- Parameters:
sessionId
- Identifier for the session.- Returns:
- a list of statements within a spark session.
- 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.
-
getSparkStatements
Gets a list of statements within a spark session.- Parameters:
sessionId
- Identifier for the session.- Returns:
- a list of statements within a spark session.
- 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.
-
createSparkStatementWithResponse
public Mono<Response<SparkStatement>> createSparkStatementWithResponse(int sessionId, SparkStatementOptions sparkStatementOptions) Create statement within a spark session.- Parameters:
sessionId
- Identifier for the session.sparkStatementOptions
- 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.
-
createSparkStatement
public Mono<SparkStatement> createSparkStatement(int sessionId, SparkStatementOptions sparkStatementOptions) Create statement within a spark session.- Parameters:
sessionId
- Identifier for the session.sparkStatementOptions
- 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.
-
getSparkStatementWithResponse
Gets a single statement within a spark session.- Parameters:
sessionId
- Identifier for the session.statementId
- Identifier for the statement.- Returns:
- a single statement within a spark session.
- 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.
-
getSparkStatement
Gets a single statement within a spark session.- Parameters:
sessionId
- Identifier for the session.statementId
- Identifier for the statement.- Returns:
- a single statement within a spark session.
- 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.
-
cancelSparkStatementWithResponse
public Mono<Response<SparkStatementCancellationResult>> cancelSparkStatementWithResponse(int sessionId, int statementId) Kill a statement within a session.- Parameters:
sessionId
- Identifier for the session.statementId
- Identifier for the statement.- 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.
-
cancelSparkStatement
Kill a statement within a session.- Parameters:
sessionId
- Identifier for the session.statementId
- Identifier for the statement.- 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.
-