public class JobClient extends Object
Constructor and Description |
---|
JobClient() |
Modifier and Type | Method and Description |
---|---|
static JobListeningContext |
attachToRunningJob(JobID jobID,
Configuration configuration,
akka.actor.ActorSystem actorSystem,
HighAvailabilityServices highAvailabilityServices,
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 CompletableFuture<InetSocketAddress> |
retrieveBlobServerAddress(JobManagerGateway jobManagerGateway,
Time timeout)
Utility method to retrieve the BlobServer address from the given JobManager gateway.
|
static ClassLoader |
retrieveClassLoader(JobID jobID,
JobManagerGateway jobManager,
Configuration config,
HighAvailabilityServices highAvailabilityServices,
Time timeout)
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,
String hostname) |
static JobListeningContext |
submitJob(akka.actor.ActorSystem actorSystem,
Configuration config,
HighAvailabilityServices highAvailabilityServices,
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,
HighAvailabilityServices highAvailabilityServices,
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(JobManagerGateway jobManagerGateway,
Configuration config,
JobGraph jobGraph,
Time timeout,
ClassLoader classLoader)
Submits a job in detached mode.
|
public static akka.actor.ActorSystem startJobClientActorSystem(Configuration config, String hostname) throws Exception
Exception
public static JobListeningContext submitJob(akka.actor.ActorSystem actorSystem, Configuration config, HighAvailabilityServices highAvailabilityServices, 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, Configuration configuration, akka.actor.ActorSystem actorSystem, HighAvailabilityServices highAvailabilityServices, scala.concurrent.duration.FiniteDuration timeout, boolean sysoutLogUpdates)
public static ClassLoader retrieveClassLoader(JobID jobID, JobManagerGateway jobManager, Configuration config, HighAvailabilityServices highAvailabilityServices, Time timeout) 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, HighAvailabilityServices highAvailabilityServices, 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.highAvailabilityServices
- Service factory for high availability servicesjobGraph
- 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(JobManagerGateway jobManagerGateway, Configuration config, JobGraph jobGraph, Time 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
public static CompletableFuture<InetSocketAddress> retrieveBlobServerAddress(JobManagerGateway jobManagerGateway, Time timeout)
jobManagerGateway
- to obtain the BlobServer address fromtimeout
- for this operationCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.