Interface ClusterClientFactory<ClusterID>
-
- All Known Implementing Classes:
AbstractContainerizedClusterClientFactory,StandaloneClientFactory
@Internal public interface ClusterClientFactory<ClusterID>A factory containing all the necessary information for creating clients to Flink clusters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ClusterDescriptor<ClusterID>createClusterDescriptor(org.apache.flink.configuration.Configuration configuration)Create aClusterDescriptorfrom the given configuration.default Optional<String>getApplicationTargetName()Returns the option to be used when trying to execute an application in Application Mode using this cluster client factory, or anOptional.empty()if the environment of this cluster client factory does not support Application Mode.ClusterIDgetClusterId(org.apache.flink.configuration.Configuration configuration)Returns the cluster id if a cluster id is specified in the provided configuration, otherwise it returnsnull.ClusterSpecificationgetClusterSpecification(org.apache.flink.configuration.Configuration configuration)Returns theClusterSpecificationspecified by the configuration and the command line options.booleanisCompatibleWith(org.apache.flink.configuration.Configuration configuration)Returnstrueif the currentClusterClientFactoryis compatible with the provided configuration,falseotherwise.
-
-
-
Method Detail
-
isCompatibleWith
boolean isCompatibleWith(org.apache.flink.configuration.Configuration configuration)
Returnstrueif the currentClusterClientFactoryis compatible with the provided configuration,falseotherwise.
-
createClusterDescriptor
ClusterDescriptor<ClusterID> createClusterDescriptor(org.apache.flink.configuration.Configuration configuration)
Create aClusterDescriptorfrom the given configuration.- Parameters:
configuration- containing the configuration options relevant for theClusterDescriptor- Returns:
- the corresponding
ClusterDescriptor.
-
getClusterId
@Nullable ClusterID getClusterId(org.apache.flink.configuration.Configuration configuration)
Returns the cluster id if a cluster id is specified in the provided configuration, otherwise it returnsnull.A cluster id identifies a running cluster, e.g. the Yarn application id for a Flink cluster running on Yarn.
- Parameters:
configuration- containing the configuration options relevant for the cluster id retrieval- Returns:
- Cluster id identifying the cluster to deploy jobs to or null
-
getClusterSpecification
ClusterSpecification getClusterSpecification(org.apache.flink.configuration.Configuration configuration)
Returns theClusterSpecificationspecified by the configuration and the command line options. This specification can be used to deploy a new Flink cluster.- Parameters:
configuration- containing the configuration options relevant for theClusterSpecification- Returns:
- the corresponding
ClusterSpecificationfor a new Flink cluster
-
getApplicationTargetName
default Optional<String> getApplicationTargetName()
Returns the option to be used when trying to execute an application in Application Mode using this cluster client factory, or anOptional.empty()if the environment of this cluster client factory does not support Application Mode.
-
-