Class AbstractSessionClusterExecutor<ClusterID,ClientFactory extends ClusterClientFactory<ClusterID>>
- java.lang.Object
-
- org.apache.flink.client.deployment.executors.AbstractSessionClusterExecutor<ClusterID,ClientFactory>
-
- Type Parameters:
ClusterID
- the type of the id of the cluster.ClientFactory
- the type of theClusterClientFactory
used to create/retrieve a client to the target cluster.
- All Implemented Interfaces:
CacheSupportedPipelineExecutor
,PipelineExecutor
- Direct Known Subclasses:
KubernetesSessionClusterExecutor
,RemoteExecutor
,YarnSessionClusterExecutor
@Internal public class AbstractSessionClusterExecutor<ClusterID,ClientFactory extends ClusterClientFactory<ClusterID>> extends Object implements CacheSupportedPipelineExecutor
An abstractPipelineExecutor
used to executepipelines
on an existing (session) cluster.
-
-
Constructor Summary
Constructors Constructor Description AbstractSessionClusterExecutor(ClientFactory clusterClientFactory, Configuration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<JobClient>
execute(Pipeline pipeline, Configuration configuration, ClassLoader userCodeClassloader)
CompletableFuture<Void>
invalidateClusterDataset(AbstractID clusterDatasetId, Configuration configuration, ClassLoader userCodeClassloader)
Invalidate the cluster dataset with the given id.CompletableFuture<Set<AbstractID>>
listCompletedClusterDatasetIds(Configuration configuration, ClassLoader userCodeClassloader)
Return a set of ids of the completed cluster dataset.
-
-
-
Constructor Detail
-
AbstractSessionClusterExecutor
public AbstractSessionClusterExecutor(@Nonnull ClientFactory clusterClientFactory, Configuration configuration)
-
-
Method Detail
-
execute
public CompletableFuture<JobClient> execute(@Nonnull Pipeline pipeline, @Nonnull Configuration configuration, @Nonnull ClassLoader userCodeClassloader) throws Exception
Description copied from interface:PipelineExecutor
Executes aPipeline
based on the provided configuration and returns aJobClient
which allows to interact with the job being executed, e.g. cancel it or take a savepoint.ATTENTION: The caller is responsible for managing the lifecycle of the returned
JobClient
. This means that e.g.close()
should be called explicitly at the call-site.- Specified by:
execute
in interfacePipelineExecutor
- Parameters:
pipeline
- thePipeline
to executeconfiguration
- theConfiguration
with the required execution parametersuserCodeClassloader
- theClassLoader
to deserialize usercode- Returns:
- a
CompletableFuture
with theJobClient
corresponding to the pipeline. - Throws:
Exception
-
listCompletedClusterDatasetIds
public CompletableFuture<Set<AbstractID>> listCompletedClusterDatasetIds(Configuration configuration, ClassLoader userCodeClassloader) throws Exception
Description copied from interface:CacheSupportedPipelineExecutor
Return a set of ids of the completed cluster dataset.- Specified by:
listCompletedClusterDatasetIds
in interfaceCacheSupportedPipelineExecutor
- Parameters:
configuration
- theConfiguration
with the required parametersuserCodeClassloader
- theClassLoader
to deserialize usercode- Returns:
- A set of ids of the completely cached intermediate dataset.
- Throws:
Exception
-
invalidateClusterDataset
public CompletableFuture<Void> invalidateClusterDataset(AbstractID clusterDatasetId, Configuration configuration, ClassLoader userCodeClassloader) throws Exception
Description copied from interface:CacheSupportedPipelineExecutor
Invalidate the cluster dataset with the given id.- Specified by:
invalidateClusterDataset
in interfaceCacheSupportedPipelineExecutor
- Parameters:
clusterDatasetId
- id of the cluster dataset to be invalidated.configuration
- theConfiguration
with the required parametersuserCodeClassloader
- theClassLoader
to deserialize usercode- Returns:
- Future which will be completed when the cached dataset is invalidated.
- Throws:
Exception
-
-