public class MiniClusterJobDispatcher extends Object
Constructor and Description |
---|
MiniClusterJobDispatcher(Configuration config,
HighAvailabilityServices haServices,
HeartbeatServices heartbeatServices,
MetricRegistry metricRegistry,
int numJobManagers,
RpcService[] rpcServices)
Starts a mini cluster job dispatcher.
|
MiniClusterJobDispatcher(Configuration config,
RpcService rpcService,
HighAvailabilityServices haServices,
HeartbeatServices heartbeatServices,
MetricRegistry metricRegistry)
Starts a mini cluster job dispatcher.
|
Modifier and Type | Method and Description |
---|---|
void |
runDetached(JobGraph job)
This method executes a job in detached mode.
|
JobExecutionResult |
runJobBlocking(JobGraph job)
This method runs a job in blocking mode.
|
void |
shutdown()
Shuts down the mini cluster dispatcher.
|
public MiniClusterJobDispatcher(Configuration config, RpcService rpcService, HighAvailabilityServices haServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry) throws Exception
The dispatcher kicks off one JobManager per job, a behavior similar to a non-highly-available setup.
config
- The configuration of the mini clusterhaServices
- Access to the discovery, leader election, and recovery servicesException
- Thrown, if the services for the JobMaster could not be started.public MiniClusterJobDispatcher(Configuration config, HighAvailabilityServices haServices, HeartbeatServices heartbeatServices, MetricRegistry metricRegistry, int numJobManagers, RpcService[] rpcServices) throws Exception
The dispatcher may kick off more than one JobManager per job, thus simulating a highly-available setup.
config
- The configuration of the mini clusterhaServices
- Access to the discovery, leader election, and recovery servicesnumJobManagers
- The number of JobMasters to start for each job.Exception
- Thrown, if the services for the JobMaster could not be started.public void shutdown()
public void runDetached(JobGraph job) throws JobExecutionException
job
- The Flink job to executeJobExecutionException
- Thrown if anything went amiss during initial job launch,
or if the job terminally failed.public JobExecutionResult runJobBlocking(JobGraph job) throws JobExecutionException, InterruptedException
job
- The Flink job to executeJobExecutionException
- Thrown if anything went amiss during initial job launch,
or if the job terminally failed.InterruptedException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.