@Internal public class LocalExecutor extends Object implements PipelineExecutor
PipelineExecutor
for executing a Pipeline
locally.Modifier and Type | Method and Description |
---|---|
static LocalExecutor |
create(Configuration configuration) |
static LocalExecutor |
createWithFactory(Configuration configuration,
Function<MiniClusterConfiguration,MiniCluster> miniClusterFactory) |
CompletableFuture<JobClient> |
execute(Pipeline pipeline,
Configuration configuration,
ClassLoader userCodeClassloader)
|
public static final String NAME
public static LocalExecutor create(Configuration configuration)
public static LocalExecutor createWithFactory(Configuration configuration, Function<MiniClusterConfiguration,MiniCluster> miniClusterFactory)
public CompletableFuture<JobClient> execute(Pipeline pipeline, Configuration configuration, 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
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.