public class JobClient extends Object
Constructor and Description |
---|
JobClient() |
Modifier and Type | Method and Description |
---|---|
static JobListeningContext |
attachToRunningJob(JobID jobID,
ActorGateway jobManagerGateWay,
Configuration configuration,
akka.actor.ActorSystem actorSystem,
LeaderRetrievalService leaderRetrievalService,
scala.concurrent.duration.FiniteDuration timeout,
boolean sysoutLogUpdates)
Attaches to a running Job using the JobID.
|
static JobExecutionResult |
awaitJobResult(JobListeningContext listeningContext)
Given a JobListeningContext, awaits the result of the job execution that this context is bound to
|
static ClassLoader |
retrieveClassLoader(JobID jobID,
ActorGateway jobManager,
Configuration config)
Reconstructs the class loader by first requesting information about it at the JobManager
and then downloading missing jar files.
|
static akka.actor.ActorSystem |
startJobClientActorSystem(Configuration config) |
static JobListeningContext |
submitJob(akka.actor.ActorSystem actorSystem,
Configuration config,
LeaderRetrievalService leaderRetrievalService,
JobGraph jobGraph,
scala.concurrent.duration.FiniteDuration timeout,
boolean sysoutLogUpdates,
ClassLoader classLoader)
Submits a job to a Flink cluster (non-blocking) and returns a JobListeningContext which can be
passed to
awaitJobResult to get the result of the submission. |
static JobExecutionResult |
submitJobAndWait(akka.actor.ActorSystem actorSystem,
Configuration config,
LeaderRetrievalService leaderRetrievalService,
JobGraph jobGraph,
scala.concurrent.duration.FiniteDuration timeout,
boolean sysoutLogUpdates,
ClassLoader classLoader)
Sends a [[JobGraph]] to the JobClient actor specified by jobClient which submits it then to
the JobManager.
|
static void |
submitJobDetached(ActorGateway jobManagerGateway,
Configuration config,
JobGraph jobGraph,
scala.concurrent.duration.FiniteDuration timeout,
ClassLoader classLoader)
Submits a job in detached mode.
|
public static akka.actor.ActorSystem startJobClientActorSystem(Configuration config) throws IOException
IOException
public static JobListeningContext submitJob(akka.actor.ActorSystem actorSystem, Configuration config, LeaderRetrievalService leaderRetrievalService, JobGraph jobGraph, scala.concurrent.duration.FiniteDuration timeout, boolean sysoutLogUpdates, ClassLoader classLoader)
awaitJobResult
to get the result of the submission.awaitJobResult(JobListeningContext context)
.public static JobListeningContext attachToRunningJob(JobID jobID, ActorGateway jobManagerGateWay, Configuration configuration, akka.actor.ActorSystem actorSystem, LeaderRetrievalService leaderRetrievalService, scala.concurrent.duration.FiniteDuration timeout, boolean sysoutLogUpdates)
public static ClassLoader retrieveClassLoader(JobID jobID, ActorGateway jobManager, Configuration config) throws JobRetrievalException
jobID
- id of jobjobManager
- gateway to the JobManagerconfig
- the flink configurationJobRetrievalException
- if anything goes wrongpublic static JobExecutionResult awaitJobResult(JobListeningContext listeningContext) throws JobExecutionException
listeningContext
- The listening context of the job executionJobExecutionException
- if anything goes wrong while monitoring the jobpublic static JobExecutionResult submitJobAndWait(akka.actor.ActorSystem actorSystem, Configuration config, LeaderRetrievalService leaderRetrievalService, JobGraph jobGraph, scala.concurrent.duration.FiniteDuration timeout, boolean sysoutLogUpdates, ClassLoader classLoader) throws JobExecutionException
actorSystem
- The actor system that performs the communication.config
- The cluster wide configuration.leaderRetrievalService
- Leader retrieval service which used to find the current leading
JobManagerjobGraph
- JobGraph describing the Flink jobtimeout
- Timeout for futuressysoutLogUpdates
- prints log updates to system out if trueclassLoader
- The class loader for deserializing the resultsJobExecutionException
- Thrown if the job
execution fails.public static void submitJobDetached(ActorGateway jobManagerGateway, Configuration config, JobGraph jobGraph, scala.concurrent.duration.FiniteDuration timeout, ClassLoader classLoader) throws JobExecutionException
jobManagerGateway
- Gateway to the JobManager which will execute the jobsconfig
- The cluster wide configuration.jobGraph
- The jobtimeout
- Timeout in which the JobManager must have responded.JobExecutionException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.