public class KubernetesClusterDescriptor extends Object implements ClusterDescriptor<String>
ClusterDescriptor
implementation.Constructor and Description |
---|
KubernetesClusterDescriptor(Configuration flinkConfig,
FlinkKubeClient client) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ClusterClientProvider<String> |
deployApplicationCluster(ClusterSpecification clusterSpecification,
ApplicationConfiguration applicationConfiguration)
Triggers deployment of an application cluster.
|
ClusterClientProvider<String> |
deployJobCluster(ClusterSpecification clusterSpecification,
JobGraph jobGraph,
boolean detached)
Deploys a per-job cluster with the given job on the cluster.
|
ClusterClientProvider<String> |
deploySessionCluster(ClusterSpecification clusterSpecification)
Triggers deployment of a cluster.
|
String |
getClusterDescription()
Returns a String containing details about the cluster (NodeManagers, available memory, ...).
|
void |
killCluster(String clusterId)
Terminates the cluster with the given cluster id.
|
ClusterClientProvider<String> |
retrieve(String clusterId)
Retrieves an existing Flink Cluster.
|
public KubernetesClusterDescriptor(Configuration flinkConfig, FlinkKubeClient client)
public String getClusterDescription()
ClusterDescriptor
getClusterDescription
in interface ClusterDescriptor<String>
public ClusterClientProvider<String> retrieve(String clusterId)
ClusterDescriptor
retrieve
in interface ClusterDescriptor<String>
clusterId
- The unique identifier of the running clusterpublic ClusterClientProvider<String> deploySessionCluster(ClusterSpecification clusterSpecification) throws ClusterDeploymentException
ClusterDescriptor
deploySessionCluster
in interface ClusterDescriptor<String>
clusterSpecification
- Cluster specification defining the cluster to deployClusterDeploymentException
- if the cluster could not be deployedpublic ClusterClientProvider<String> deployApplicationCluster(ClusterSpecification clusterSpecification, ApplicationConfiguration applicationConfiguration) throws ClusterDeploymentException
ClusterDescriptor
main()
of the
application's user code will be executed on the cluster, rather than the client.deployApplicationCluster
in interface ClusterDescriptor<String>
clusterSpecification
- Cluster specification defining the cluster to deployapplicationConfiguration
- Application-specific configuration parametersClusterDeploymentException
- if the cluster could not be deployedpublic ClusterClientProvider<String> deployJobCluster(ClusterSpecification clusterSpecification, JobGraph jobGraph, boolean detached) throws ClusterDeploymentException
ClusterDescriptor
deployJobCluster
in interface ClusterDescriptor<String>
clusterSpecification
- Initial cluster specification with which the Flink cluster is
launchedjobGraph
- JobGraph with which the job cluster is starteddetached
- true if the cluster should be stopped after the job completion without
serving the result, otherwise falseClusterDeploymentException
- if the cluster could not be deployedpublic void killCluster(String clusterId) throws FlinkException
ClusterDescriptor
killCluster
in interface ClusterDescriptor<String>
clusterId
- identifying the cluster to shut downFlinkException
- if the cluster could not be terminatedpublic void close()
close
in interface AutoCloseable
close
in interface ClusterDescriptor<String>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.