hopsworks.core.flink_cluster_api #
[source] FlinkClusterApi #
Returned by
[source] setup_cluster #
setup_cluster(
name: str, config=None
) -> flink_cluster.FlinkCluster
Create a new flink job representing a flink cluster, or update an existing one.
import hopsworks
project = hopsworks.login()
flink_cluster_api = project.get_flink_cluster_api()
flink_config = flink_cluster_api.get_configuration()
flink_config['appName'] = "myFlinkCluster"
flink_cluster = flink_cluster_api.setup_cluster(name="myFlinkCluster", config=flink_config)
| PARAMETER | DESCRIPTION |
|---|---|
name | Name of the cluster. TYPE: |
config | Configuration of the cluster. DEFAULT: |
| RETURNS | DESCRIPTION |
|---|---|
flink_cluster.FlinkCluster | The FlinkCluster object representing the cluster. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
[source] get_cluster #
get_cluster(name: str) -> flink_cluster.FlinkCluster | None
Get the job corresponding to the flink cluster.
import hopsworks
project = hopsworks.login()
flink_cluster_api = project.get_flink_cluster_api()
flink_cluster = flink_cluster_api.get_cluster(name="myFlinkCluster")
| PARAMETER | DESCRIPTION |
|---|---|
name | Name of the cluster. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
flink_cluster.FlinkCluster | None | The FlinkCluster object representing the cluster or |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |