Interface ClusterDescriptor<T>

Type Parameters:
T - Type of the cluster id
All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
StandaloneClusterDescriptor

public interface ClusterDescriptor<T> extends AutoCloseable
A descriptor to deploy a cluster (e.g. Yarn) and return a Client for Cluster communication.
  • Method Details

    • getClusterDescription

      String getClusterDescription()
      Returns a String containing details about the cluster (NodeManagers, available memory, ...).
    • retrieve

      ClusterClientProvider<T> retrieve(T clusterId) throws ClusterRetrieveException
      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, the main() of the application's user code will be executed on the cluster, rather than the client.
      Parameters:
      clusterSpecification - Cluster specification defining the cluster to deploy
      applicationConfiguration - Application-specific configuration parameters
      Returns:
      Client for the cluster
      Throws:
      ClusterDeploymentException - if the cluster could not be deployed
    • killCluster

      void killCluster(T clusterId) throws org.apache.flink.util.FlinkException
      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:
      close in interface AutoCloseable