Class EmbeddedExecutorServiceLoader
- java.lang.Object
-
- org.apache.flink.client.deployment.application.executors.EmbeddedExecutorServiceLoader
-
- All Implemented Interfaces:
PipelineExecutorServiceLoader
@Internal public class EmbeddedExecutorServiceLoader extends Object implements PipelineExecutorServiceLoader
APipelineExecutorServiceLoader
that always returns anEmbeddedExecutorFactory
. This is useful when running the user's main on the cluster.
-
-
Constructor Summary
Constructors Constructor Description EmbeddedExecutorServiceLoader(Collection<JobID> submittedJobIds, DispatcherGateway dispatcherGateway, ScheduledExecutor retryExecutor)
Creates anEmbeddedExecutorServiceLoader
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PipelineExecutorFactory
getExecutorFactory(Configuration configuration)
Loads thePipelineExecutorFactory
which is compatible with the provided configuration.Stream<String>
getExecutorNames()
Loads and returns a stream of the names of all available executors.
-
-
-
Constructor Detail
-
EmbeddedExecutorServiceLoader
public EmbeddedExecutorServiceLoader(Collection<JobID> submittedJobIds, DispatcherGateway dispatcherGateway, ScheduledExecutor retryExecutor)
Creates anEmbeddedExecutorServiceLoader
.- Parameters:
submittedJobIds
- a list that is going to be filled by theEmbeddedExecutor
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.
-
-
Method Detail
-
getExecutorFactory
public PipelineExecutorFactory getExecutorFactory(Configuration configuration)
Description copied from interface:PipelineExecutorServiceLoader
Loads thePipelineExecutorFactory
which is compatible with the provided configuration. There can be at most one compatible factory among the available ones, otherwise an exception will be thrown.- Specified by:
getExecutorFactory
in interfacePipelineExecutorServiceLoader
- Returns:
- a compatible
PipelineExecutorFactory
.
-
getExecutorNames
public Stream<String> getExecutorNames()
Description copied from interface:PipelineExecutorServiceLoader
Loads and returns a stream of the names of all available executors.- Specified by:
getExecutorNames
in interfacePipelineExecutorServiceLoader
-
-