public class JobClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JobClient.JobCleanUp
Inner class used to perform clean up tasks when the
job client is terminated.
|
| Constructor and Description |
|---|
JobClient(JobGraph jobGraph,
ClassLoader userCodeClassLoader)
Constructs a new job client object and instantiates a local
RPC proxy for the JobSubmissionProtocol
|
JobClient(JobGraph jobGraph,
Configuration configuration,
ClassLoader userCodeClassLoader)
Constructs a new job client object and instantiates a local
RPC proxy for the JobSubmissionProtocol
|
| Modifier and Type | Method and Description |
|---|---|
JobCancelResult |
cancelJob()
Cancels the job assigned to this job client.
|
void |
close()
Closes the
JobClient by destroying the RPC stub object. |
Configuration |
getConfiguration()
Returns the
Configuration object which can include special configuration settings for the job client. |
JobProgressResult |
getJobProgress()
Retrieves the current status of the job assigned to this job client.
|
int |
getRecommendedPollingInterval()
Returns the recommended interval in seconds in which a client
is supposed to poll for progress information.
|
void |
setConsoleStreamForReporting(PrintStream stream) |
JobSubmissionResult |
submitJob()
Submits the job assigned to this job client to the job manager.
|
JobExecutionResult |
submitJobAndWait()
Submits the job assigned to this job client to the job manager and queries the job manager
about the progress of the job until it is either finished or aborted.
|
public JobClient(JobGraph jobGraph, ClassLoader userCodeClassLoader) throws IOException
jobGraph - the job graph to runIOException - thrown on error while initializing the RPC connection to the job managerpublic JobClient(JobGraph jobGraph, Configuration configuration, ClassLoader userCodeClassLoader) throws IOException
jobGraph - the job graph to runconfiguration - configuration object which can include special configuration settings for the job clientIOException - thrown on error while initializing the RPC connection to the job managerpublic void close()
JobClient by destroying the RPC stub object.public Configuration getConfiguration()
Configuration object which can include special configuration settings for the job client.Configuration object which can include special configuration settings for the job clientpublic JobSubmissionResult submitJob() throws IOException
JobSubmissionResult object encapsulating the results of the job submissionIOException - thrown in case of submission errors while transmitting the data to the job managerpublic JobCancelResult cancelJob() throws IOException
JobCancelResult object encapsulating the result of the job cancel requestIOException - thrown if an error occurred while transmitting the request to the job managerpublic JobProgressResult getJobProgress() throws IOException
JobProgressResult object including the current job progressIOException - thrown if an error occurred while transmitting the requestpublic JobExecutionResult submitJobAndWait() throws IOException, JobExecutionException
IOException - thrown if an error occurred while transmitting the requestJobExecutionException - thrown if the job has been aborted either by the user or as a result of an errorpublic int getRecommendedPollingInterval()
throws IOException
IOException - thrown if an error occurred while transmitting the requestpublic void setConsoleStreamForReporting(PrintStream stream)
Copyright © 2015 The Apache Software Foundation. All rights reserved.