Interface ClusterDescriptor<T>
- Type Parameters:
T- Type of the cluster id
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
StandaloneClusterDescriptor
A descriptor to deploy a cluster (e.g. Yarn) and return a Client for Cluster communication.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()deployApplicationCluster(ClusterSpecification clusterSpecification, ApplicationConfiguration applicationConfiguration) Triggers deployment of an application cluster.deploySessionCluster(ClusterSpecification clusterSpecification) Triggers deployment of a cluster.Returns a String containing details about the cluster (NodeManagers, available memory, ...).voidkillCluster(T clusterId) Terminates the cluster with the given cluster id.Retrieves an existing Flink Cluster.
-
Method Details
-
getClusterDescription
String getClusterDescription()Returns a String containing details about the cluster (NodeManagers, available memory, ...). -
retrieve
Retrieves an existing Flink Cluster.- Parameters:
clusterId- The unique identifier of the running cluster- Returns:
- Client for the cluster
- Throws:
ClusterRetrieveException- if the cluster client could not be retrieved
-
deploySessionCluster
ClusterClientProvider<T> deploySessionCluster(ClusterSpecification clusterSpecification) throws ClusterDeploymentException Triggers deployment of a cluster.- Parameters:
clusterSpecification- Cluster specification defining the cluster to deploy- Returns:
- Client for the cluster
- Throws:
ClusterDeploymentException- if the cluster could not be deployed
-
deployApplicationCluster
ClusterClientProvider<T> deployApplicationCluster(ClusterSpecification clusterSpecification, ApplicationConfiguration applicationConfiguration) throws ClusterDeploymentException Triggers deployment of an application cluster. This corresponds to a cluster dedicated to the execution of a predefined application. The cluster will be created on application submission and torn down upon application termination. In addition, themain()of the application's user code will be executed on the cluster, rather than the client.- Parameters:
clusterSpecification- Cluster specification defining the cluster to deployapplicationConfiguration- Application-specific configuration parameters- Returns:
- Client for the cluster
- Throws:
ClusterDeploymentException- if the cluster could not be deployed
-
killCluster
Terminates the cluster with the given cluster id.- Parameters:
clusterId- identifying the cluster to shut down- Throws:
org.apache.flink.util.FlinkException- if the cluster could not be terminated
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-