public interface ClusterService
| Modifier and Type | Method and Description |
|---|---|
String |
create(CreateClusterRequest createClusterRequest)
Deprecated.
in version 2.3.2, please use
create(NewClusterDTO) |
String |
create(NewClusterDTO clusterDTO)
Creates a databricks cluster.
|
void |
delete(String clusterId)
Terminates a cluster.
|
void |
edit(EditClusterRequest editClusterRequest)
Deprecated.
in version 2.3.2, please use
edit(UpsertClusterDTO) |
void |
edit(UpsertClusterDTO clusterDTO)
Edits the configurations of a databricks cluster.
|
List<ClusterInfoDTO> |
findByName(String clusterName)
Look for clusters with a given name.
|
Optional<ClusterInfoDTO> |
findUniqueByName(String clusterName)
Same as findByName, but it will throw an exception if more then one cluster has the name.
|
ClusterInfoDTO |
getInfo(String clusterId)
Gets information about a given cluster.
|
boolean |
isClusterRunning(String clusterId)
Returns true if the cluster is running.
|
ClusterInfoDTO[] |
list()
Lists all of the clusters on a given databricks instance.
|
List<ClusterEventDTO> |
listEvents(String clusterId,
ClusterEventTypeDTO[] eventsToFilter,
int offset,
int limit)
Lists events of a specific cluster on a given databricks instance.
|
List<NodeTypeDTO> |
listNodeTypes()
Return a list of supported Spark node types.
|
List<SparkVersionDTO> |
listSparkVersions()
Return the list of available runtime versions.
|
List<String> |
listZones()
Return a list of availability zones where clusters can be created in.
|
void |
permanentDelete(String clusterId)
Permanently terminates a cluster.
|
void |
pin(String clusterId)
Pin a cluster with a given id.
|
void |
resize(AutoScaleDTO autoscale,
String clusterId)
Resizes a cluster.
|
void |
resize(int numWorkers,
String clusterId)
Resizes a cluster.
|
void |
restart(String clusterId)
Restarts a given databricks cluster.
|
void |
start(String clusterId)
Starts a databricks cluster.
|
void |
unpin(String clusterId)
Unpin a cluster with a given id.
|
void |
upsertCluster(NewClusterDTO clusterDTO)
Given a cluster settings DTO object it will:
- create the cluster if it doesn't exist
- edit the cluster if it does exist.
|
@Deprecated String create(CreateClusterRequest createClusterRequest) throws IOException, DatabricksRestException
create(NewClusterDTO)createClusterRequest - the cluster request objectIOException - other connection errorsDatabricksRestException - any errors with the requestString create(NewClusterDTO clusterDTO) throws IOException, DatabricksRestException
clusterDTO - cluster DTOIOException - other connection errorsDatabricksRestException - any errors with the request@Deprecated void edit(EditClusterRequest editClusterRequest) throws IOException, DatabricksRestException
edit(UpsertClusterDTO)editClusterRequest - the edit cluster request objectIOException - any other errorsDatabricksRestException - any errors with the requestvoid edit(UpsertClusterDTO clusterDTO) throws IOException, DatabricksRestException
clusterDTO - cluster DTOIOException - any other errorsDatabricksRestException - any errors with the requestvoid start(String clusterId) throws IOException, DatabricksRestException
clusterId - the clusterId of the cluster you want to start.IOException - any other errorsDatabricksRestException - any errors with the requestboolean isClusterRunning(String clusterId) throws IOException, DatabricksRestException
clusterId - the clusterId to check.IOException - any other errorsDatabricksRestException - any errors with the requestvoid restart(String clusterId) throws IOException, DatabricksRestException
clusterId - the clusterid of the cluster you want to restart.IOException - any other errorsDatabricksRestException - any errors with the requestvoid resize(int numWorkers,
String clusterId)
throws IOException,
DatabricksRestException
numWorkers - the number of workers you want to resize toclusterId - the clusterId you want to operate onIOException - any other errorsDatabricksRestException - any errors with requestvoid resize(AutoScaleDTO autoscale, String clusterId) throws IOException, DatabricksRestException
autoscale - the autoscale specs.clusterId - the clusterId you want to work onIOException - any other errorsDatabricksRestException - any errors with requestvoid delete(String clusterId) throws IOException, DatabricksRestException
clusterId - the cluster you want to terminateIOException - any other errorsDatabricksRestException - errors with requestvoid permanentDelete(String clusterId) throws IOException, DatabricksRestException
clusterId - the cluster you want to permanently terminateIOException - any other errorsDatabricksRestException - errors with requestClusterInfoDTO getInfo(String clusterId) throws IOException, DatabricksRestException
clusterId - the cluster you want to get info aboutIOException - any other errors.DatabricksRestException - any errors with the requestClusterInfoDTO[] list() throws IOException, DatabricksRestException
IOException - any other errorsDatabricksRestException - any errors with the requestList<ClusterEventDTO> listEvents(String clusterId, ClusterEventTypeDTO[] eventsToFilter, int offset, int limit) throws IOException, DatabricksRestException
IOException - any other errorsDatabricksRestException - any errors with the requestvoid upsertCluster(NewClusterDTO clusterDTO) throws IOException, DatabricksRestException
clusterDTO - cluster DTOIOExceptionDatabricksRestExceptionList<ClusterInfoDTO> findByName(String clusterName) throws IOException, DatabricksRestException
clusterName - name to look forIOException - any other errorsDatabricksRestException - any errors with the requestOptional<ClusterInfoDTO> findUniqueByName(String clusterName) throws IOException, DatabricksRestException
clusterName - name to look forIOException - any other errorsDatabricksRestException - any errors with the request,
including if more then 1 cluster was found with the name.void pin(String clusterId) throws IOException, DatabricksRestException
clusterId - the clusterId you want to pinIOException - any other errorsDatabricksRestException - any errors with the requestvoid unpin(String clusterId) throws IOException, DatabricksRestException
clusterId - the clusterId you want to unpinIOException - any other errorsDatabricksRestException - any errors with the requestList<NodeTypeDTO> listNodeTypes() throws IOException, DatabricksRestException
IOException - any other errorsDatabricksRestException - any errors with the requestList<String> listZones() throws IOException, DatabricksRestException
IOException - any other errorsDatabricksRestException - any errors with the requestList<SparkVersionDTO> listSparkVersions() throws IOException, DatabricksRestException
IOException - any other errorsDatabricksRestException - any errors with the requestCopyright © 2023. All rights reserved.