public class StandaloneClusterDescriptor extends Object implements ClusterDescriptor<StandaloneClusterId>
Constructor and Description |
---|
StandaloneClusterDescriptor(Configuration config) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ClusterClientProvider<StandaloneClusterId> |
deployApplicationCluster(ClusterSpecification clusterSpecification,
ApplicationConfiguration applicationConfiguration)
Triggers deployment of an application cluster.
|
ClusterClientProvider<StandaloneClusterId> |
deployJobCluster(ClusterSpecification clusterSpecification,
JobGraph jobGraph,
boolean detached)
Deploys a per-job cluster with the given job on the cluster.
|
ClusterClientProvider<StandaloneClusterId> |
deploySessionCluster(ClusterSpecification clusterSpecification)
Triggers deployment of a cluster.
|
String |
getClusterDescription()
Returns a String containing details about the cluster (NodeManagers, available memory, ...).
|
void |
killCluster(StandaloneClusterId clusterId)
Terminates the cluster with the given cluster id.
|
ClusterClientProvider<StandaloneClusterId> |
retrieve(StandaloneClusterId standaloneClusterId)
Retrieves an existing Flink Cluster.
|
public StandaloneClusterDescriptor(Configuration config)
public String getClusterDescription()
ClusterDescriptor
getClusterDescription
in interface ClusterDescriptor<StandaloneClusterId>
public ClusterClientProvider<StandaloneClusterId> retrieve(StandaloneClusterId standaloneClusterId) throws ClusterRetrieveException
ClusterDescriptor
retrieve
in interface ClusterDescriptor<StandaloneClusterId>
standaloneClusterId
- The unique identifier of the running clusterClusterRetrieveException
- if the cluster client could not be retrievedpublic ClusterClientProvider<StandaloneClusterId> deploySessionCluster(ClusterSpecification clusterSpecification)
ClusterDescriptor
deploySessionCluster
in interface ClusterDescriptor<StandaloneClusterId>
clusterSpecification
- Cluster specification defining the cluster to deploypublic ClusterClientProvider<StandaloneClusterId> deployApplicationCluster(ClusterSpecification clusterSpecification, ApplicationConfiguration applicationConfiguration)
ClusterDescriptor
main()
of the
application's user code will be executed on the cluster, rather than the client.deployApplicationCluster
in interface ClusterDescriptor<StandaloneClusterId>
clusterSpecification
- Cluster specification defining the cluster to deployapplicationConfiguration
- Application-specific configuration parameterspublic ClusterClientProvider<StandaloneClusterId> deployJobCluster(ClusterSpecification clusterSpecification, JobGraph jobGraph, boolean detached)
ClusterDescriptor
deployJobCluster
in interface ClusterDescriptor<StandaloneClusterId>
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 falsepublic void killCluster(StandaloneClusterId clusterId) throws FlinkException
ClusterDescriptor
killCluster
in interface ClusterDescriptor<StandaloneClusterId>
clusterId
- identifying the cluster to shut downFlinkException
- if the cluster could not be terminatedpublic void close()
close
in interface AutoCloseable
close
in interface ClusterDescriptor<StandaloneClusterId>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.