Class CommandExecutionAPI
- java.lang.Object
-
- com.databricks.sdk.service.compute.CommandExecutionAPI
-
@Generated public class CommandExecutionAPI extends Object
This API allows execution of Python, Scala, SQL, or R commands on running Databricks Clusters.
-
-
Constructor Summary
Constructors Constructor Description CommandExecutionAPI(ApiClient apiClient)
Regular-use constructorCommandExecutionAPI(CommandExecutionService mock)
Constructor for mocks
-
Method Summary
-
-
-
Constructor Detail
-
CommandExecutionAPI
public CommandExecutionAPI(ApiClient apiClient)
Regular-use constructor
-
CommandExecutionAPI
public CommandExecutionAPI(CommandExecutionService mock)
Constructor for mocks
-
-
Method Detail
-
waitCommandStatusCommandExecutionCancelled
public CommandStatusResponse waitCommandStatusCommandExecutionCancelled(String clusterId, String commandId, String contextId) throws TimeoutException
- Throws:
TimeoutException
-
waitCommandStatusCommandExecutionCancelled
public CommandStatusResponse waitCommandStatusCommandExecutionCancelled(String clusterId, String commandId, String contextId, Duration timeout, Consumer<CommandStatusResponse> callback) throws TimeoutException
- Throws:
TimeoutException
-
waitCommandStatusCommandExecutionFinishedOrError
public CommandStatusResponse waitCommandStatusCommandExecutionFinishedOrError(String clusterId, String commandId, String contextId) throws TimeoutException
- Throws:
TimeoutException
-
waitCommandStatusCommandExecutionFinishedOrError
public CommandStatusResponse waitCommandStatusCommandExecutionFinishedOrError(String clusterId, String commandId, String contextId, Duration timeout, Consumer<CommandStatusResponse> callback) throws TimeoutException
- Throws:
TimeoutException
-
waitContextStatusCommandExecutionRunning
public ContextStatusResponse waitContextStatusCommandExecutionRunning(String clusterId, String contextId) throws TimeoutException
- Throws:
TimeoutException
-
waitContextStatusCommandExecutionRunning
public ContextStatusResponse waitContextStatusCommandExecutionRunning(String clusterId, String contextId, Duration timeout, Consumer<ContextStatusResponse> callback) throws TimeoutException
- Throws:
TimeoutException
-
cancel
public Wait<CommandStatusResponse,Void> cancel(CancelCommand request)
Cancel a command.Cancels a currently running command within an execution context.
The command ID is obtained from a prior successful call to __execute__.
-
commandStatus
public CommandStatusResponse commandStatus(String clusterId, String contextId, String commandId)
-
commandStatus
public CommandStatusResponse commandStatus(CommandStatusRequest request)
Get command info.Gets the status of and, if available, the results from a currently executing command.
The command ID is obtained from a prior successful call to __execute__.
-
contextStatus
public ContextStatusResponse contextStatus(String clusterId, String contextId)
-
contextStatus
public ContextStatusResponse contextStatus(ContextStatusRequest request)
Get status.Gets the status for an execution context.
-
create
public Wait<ContextStatusResponse,Created> create(CreateContext request)
Create an execution context.Creates an execution context for running cluster commands.
If successful, this method returns the ID of the new execution context.
-
destroy
public void destroy(DestroyContext request)
Delete an execution context.Deletes an execution context.
-
execute
public Wait<CommandStatusResponse,Created> execute(Command request)
Run a command.Runs a cluster command in the given execution context, using the provided language.
If successful, it returns an ID for tracking the status of the command's execution.
-
impl
public CommandExecutionService impl()
-
-