ClusterID
- the type of the id of the cluster.ClientFactory
- the type of the ClusterClientFactory
used to create/retrieve a
client to the target cluster.@Internal public class AbstractSessionClusterExecutor<ClusterID,ClientFactory extends ClusterClientFactory<ClusterID>> extends Object implements CacheSupportedPipelineExecutor
PipelineExecutor
used to execute pipelines
on an existing
(session) cluster.Constructor and Description |
---|
AbstractSessionClusterExecutor(ClientFactory clusterClientFactory) |
Modifier and Type | Method and 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.
|
public AbstractSessionClusterExecutor(@Nonnull ClientFactory clusterClientFactory)
public CompletableFuture<JobClient> execute(@Nonnull Pipeline pipeline, @Nonnull Configuration configuration, @Nonnull ClassLoader userCodeClassloader) throws Exception
PipelineExecutor
Pipeline
based on the provided configuration and returns a JobClient
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.
execute
in interface PipelineExecutor
pipeline
- the Pipeline
to executeconfiguration
- the Configuration
with the required execution parametersuserCodeClassloader
- the ClassLoader
to deserialize usercodeCompletableFuture
with the JobClient
corresponding to the pipeline.Exception
public CompletableFuture<Set<AbstractID>> listCompletedClusterDatasetIds(Configuration configuration, ClassLoader userCodeClassloader) throws Exception
CacheSupportedPipelineExecutor
listCompletedClusterDatasetIds
in interface CacheSupportedPipelineExecutor
configuration
- the Configuration
with the required parametersuserCodeClassloader
- the ClassLoader
to deserialize usercodeException
public CompletableFuture<Void> invalidateClusterDataset(AbstractID clusterDatasetId, Configuration configuration, ClassLoader userCodeClassloader) throws Exception
CacheSupportedPipelineExecutor
invalidateClusterDataset
in interface CacheSupportedPipelineExecutor
clusterDatasetId
- id of the cluster dataset to be invalidated.configuration
- the Configuration
with the required parametersuserCodeClassloader
- the ClassLoader
to deserialize usercodeException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.