public final class SparkSessionClient extends Object
Modifier and Type | Method and Description |
---|---|
void |
cancelSparkSession(int sessionId)
Cancels a running spark session.
|
com.azure.core.http.rest.Response<Void> |
cancelSparkSessionWithResponse(int sessionId,
com.azure.core.util.Context context)
Cancels a running spark session.
|
SparkStatementCancellationResult |
cancelSparkStatement(int sessionId,
int statementId)
Kill a statement within a session.
|
com.azure.core.http.rest.Response<SparkStatementCancellationResult> |
cancelSparkStatementWithResponse(int sessionId,
int statementId,
com.azure.core.util.Context context)
Kill a statement within a session.
|
SparkSession |
createSparkSession(SparkSessionOptions sparkSessionOptions)
Create new spark session.
|
SparkSession |
createSparkSession(SparkSessionOptions sparkSessionOptions,
Boolean detailed)
Create new spark session.
|
com.azure.core.http.rest.Response<SparkSession> |
createSparkSessionWithResponse(SparkSessionOptions sparkSessionOptions,
Boolean detailed,
com.azure.core.util.Context context)
Create new spark session.
|
SparkStatement |
createSparkStatement(int sessionId,
SparkStatementOptions sparkStatementOptions)
Create statement within a spark session.
|
com.azure.core.http.rest.Response<SparkStatement> |
createSparkStatementWithResponse(int sessionId,
SparkStatementOptions sparkStatementOptions,
com.azure.core.util.Context context)
Create statement within a spark session.
|
SparkSession |
getSparkSession(int sessionId)
Gets a single spark session.
|
SparkSession |
getSparkSession(int sessionId,
Boolean detailed)
Gets a single spark session.
|
SparkSessionCollection |
getSparkSessions()
List all spark sessions which are running under a particular spark pool.
|
SparkSessionCollection |
getSparkSessions(Integer from,
Integer size,
Boolean detailed)
List all spark sessions which are running under a particular spark pool.
|
com.azure.core.http.rest.Response<SparkSessionCollection> |
getSparkSessionsWithResponse(Integer from,
Integer size,
Boolean detailed,
com.azure.core.util.Context context)
List all spark sessions which are running under a particular spark pool.
|
com.azure.core.http.rest.Response<SparkSession> |
getSparkSessionWithResponse(int sessionId,
Boolean detailed,
com.azure.core.util.Context context)
Gets a single spark session.
|
SparkStatement |
getSparkStatement(int sessionId,
int statementId)
Gets a single statement within a spark session.
|
SparkStatementCollection |
getSparkStatements(int sessionId)
Gets a list of statements within a spark session.
|
com.azure.core.http.rest.Response<SparkStatementCollection> |
getSparkStatementsWithResponse(int sessionId,
com.azure.core.util.Context context)
Gets a list of statements within a spark session.
|
com.azure.core.http.rest.Response<SparkStatement> |
getSparkStatementWithResponse(int sessionId,
int statementId,
com.azure.core.util.Context context)
Gets a single statement within a spark session.
|
void |
resetSparkSessionTimeout(int sessionId)
Sends a keep alive call to the current session to reset the session timeout.
|
com.azure.core.http.rest.Response<Void> |
resetSparkSessionTimeoutWithResponse(int sessionId,
com.azure.core.util.Context context)
Sends a keep alive call to the current session to reset the session timeout.
|
public SparkSessionCollection getSparkSessions(Integer from, Integer size, Boolean detailed)
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.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkSessionCollection getSparkSessions()
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<SparkSessionCollection> getSparkSessionsWithResponse(Integer from, Integer size, Boolean detailed, com.azure.core.util.Context context)
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.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkSession createSparkSession(SparkSessionOptions sparkSessionOptions, Boolean detailed)
sparkSessionOptions
- Livy compatible batch job request payload.detailed
- Optional query param specifying whether detailed response is returned beyond plain livy.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkSession createSparkSession(SparkSessionOptions sparkSessionOptions)
sparkSessionOptions
- Livy compatible batch job request payload.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<SparkSession> createSparkSessionWithResponse(SparkSessionOptions sparkSessionOptions, Boolean detailed, com.azure.core.util.Context context)
sparkSessionOptions
- 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.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkSession getSparkSession(int sessionId, Boolean detailed)
sessionId
- Identifier for the session.detailed
- Optional query param specifying whether detailed response is returned beyond plain livy.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkSession getSparkSession(int sessionId)
sessionId
- Identifier for the session.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<SparkSession> getSparkSessionWithResponse(int sessionId, Boolean detailed, com.azure.core.util.Context context)
sessionId
- Identifier for the session.detailed
- Optional query param specifying whether detailed response is returned beyond plain livy.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public void cancelSparkSession(int sessionId)
sessionId
- Identifier for the session.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> cancelSparkSessionWithResponse(int sessionId, com.azure.core.util.Context context)
sessionId
- Identifier for the session.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public void resetSparkSessionTimeout(int sessionId)
sessionId
- Identifier for the session.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<Void> resetSparkSessionTimeoutWithResponse(int sessionId, com.azure.core.util.Context context)
sessionId
- Identifier for the session.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkStatementCollection getSparkStatements(int sessionId)
sessionId
- Identifier for the session.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<SparkStatementCollection> getSparkStatementsWithResponse(int sessionId, com.azure.core.util.Context context)
sessionId
- Identifier for the session.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkStatement createSparkStatement(int sessionId, SparkStatementOptions sparkStatementOptions)
sessionId
- Identifier for the session.sparkStatementOptions
- Livy compatible batch job request payload.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<SparkStatement> createSparkStatementWithResponse(int sessionId, SparkStatementOptions sparkStatementOptions, com.azure.core.util.Context context)
sessionId
- Identifier for the session.sparkStatementOptions
- Livy compatible batch job request payload.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkStatement getSparkStatement(int sessionId, int statementId)
sessionId
- Identifier for the session.statementId
- Identifier for the statement.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<SparkStatement> getSparkStatementWithResponse(int sessionId, int statementId, com.azure.core.util.Context context)
sessionId
- Identifier for the session.statementId
- Identifier for the statement.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public SparkStatementCancellationResult cancelSparkStatement(int sessionId, int statementId)
sessionId
- Identifier for the session.statementId
- Identifier for the statement.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<SparkStatementCancellationResult> cancelSparkStatementWithResponse(int sessionId, int statementId, com.azure.core.util.Context context)
sessionId
- Identifier for the session.statementId
- Identifier for the statement.context
- The context to associate with this operation.IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.Copyright © 2021 Microsoft Corporation. All rights reserved.