@Internal public class EmbeddedExecutor extends Object implements PipelineExecutor
executors
that invoke directly methods of the Dispatcher
and do not go through the REST
API.Constructor and Description |
---|
EmbeddedExecutor(Collection<JobID> submittedJobIds,
DispatcherGateway dispatcherGateway,
EmbeddedJobClientCreator jobClientCreator)
Creates a
EmbeddedExecutor . |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<JobClient> |
execute(Pipeline pipeline,
Configuration configuration,
ClassLoader userCodeClassloader)
|
public static final String NAME
public EmbeddedExecutor(Collection<JobID> submittedJobIds, DispatcherGateway dispatcherGateway, EmbeddedJobClientCreator jobClientCreator)
EmbeddedExecutor
.submittedJobIds
- a list that is going to be filled with the job ids of the new jobs
that will be submitted. This is essentially used to return the submitted job ids to the
caller.dispatcherGateway
- the dispatcher of the cluster which is going to be used to submit
jobs.public CompletableFuture<JobClient> execute(Pipeline pipeline, Configuration configuration, ClassLoader userCodeClassloader) throws MalformedURLException
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.MalformedURLException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.