public class StandaloneClusterClient extends ClusterClient<StandaloneClusterId>
ClusterClient.LazyActorSystemLoaderactorSystemLoader, flinkConfig, highAvailabilityServices, lastJobExecutionResult, log, MAX_SLOTS_UNKNOWN, timeout| Constructor and Description |
|---|
StandaloneClusterClient(org.apache.flink.configuration.Configuration config) |
StandaloneClusterClient(org.apache.flink.configuration.Configuration config,
org.apache.flink.runtime.highavailability.HighAvailabilityServices highAvailabilityServices,
boolean sharedHaServices) |
StandaloneClusterClient(org.apache.flink.configuration.Configuration config,
org.apache.flink.runtime.highavailability.HighAvailabilityServices highAvailabilityServices,
boolean sharedHaServices,
ActorSystemLoader actorSystemLoader) |
| Modifier and Type | Method and Description |
|---|---|
StandaloneClusterId |
getClusterId()
Returns the cluster id identifying the cluster to which the client is connected.
|
org.apache.flink.runtime.clusterframework.messages.GetClusterStatusResponse |
getClusterStatus()
Returns the latest cluster status, with number of Taskmanagers and slots.
|
int |
getMaxSlots()
The client may define an upper limit on the number of slots to use.
|
List<String> |
getNewMessages()
May return new messages from the cluster.
|
String |
getWebInterfaceURL()
Returns an URL (as a string) to the JobManager web interface.
|
boolean |
hasUserJarsInClassPath(List<URL> userJarFiles)
Returns true if the client already has the user jar and providing it again would
result in duplicate uploading of the jar.
|
org.apache.flink.api.common.JobSubmissionResult |
submitJob(org.apache.flink.runtime.jobgraph.JobGraph jobGraph,
ClassLoader classLoader)
Calls the subclasses' submitJob method.
|
void |
waitForClusterToBeReady()
Blocks until the client has determined that the cluster is ready for Job submission.
|
cancel, cancelWithSavepoint, connectToJob, disposeSavepoint, endSession, endSessions, getAccumulators, getAccumulators, getClusterConnectionInfo, getFlinkConfiguration, getJobGraph, getJobGraph, getJobManagerGateway, getJobStatus, getOptimizedPlan, getOptimizedPlan, getOptimizedPlanAsJson, getPrintStatusDuringExecution, isDetached, listJobs, logAndSysout, rescaleJob, retrieveJob, run, run, run, run, run, run, runDetached, setDetached, setPrintStatusDuringExecution, shutdown, shutDownCluster, stop, triggerSavepointpublic StandaloneClusterClient(org.apache.flink.configuration.Configuration config)
throws Exception
Exceptionpublic StandaloneClusterClient(org.apache.flink.configuration.Configuration config,
org.apache.flink.runtime.highavailability.HighAvailabilityServices highAvailabilityServices,
boolean sharedHaServices)
public StandaloneClusterClient(org.apache.flink.configuration.Configuration config,
org.apache.flink.runtime.highavailability.HighAvailabilityServices highAvailabilityServices,
boolean sharedHaServices,
ActorSystemLoader actorSystemLoader)
public void waitForClusterToBeReady()
ClusterClientThis is delayed until right before job submission to report any other errors first (e.g. invalid job definitions/errors in the user jar)
waitForClusterToBeReady in class ClusterClient<StandaloneClusterId>public String getWebInterfaceURL()
ClusterClientgetWebInterfaceURL in class ClusterClient<StandaloneClusterId>public org.apache.flink.runtime.clusterframework.messages.GetClusterStatusResponse getClusterStatus()
ClusterClientgetClusterStatus in class ClusterClient<StandaloneClusterId>public List<String> getNewMessages()
ClusterClientgetNewMessages in class ClusterClient<StandaloneClusterId>public StandaloneClusterId getClusterId()
ClusterClientgetClusterId in class ClusterClient<StandaloneClusterId>public int getMaxSlots()
ClusterClientgetMaxSlots in class ClusterClient<StandaloneClusterId>ClusterClient.MAX_SLOTS_UNKNOWN) if unknownpublic boolean hasUserJarsInClassPath(List<URL> userJarFiles)
ClusterClienthasUserJarsInClassPath in class ClusterClient<StandaloneClusterId>public org.apache.flink.api.common.JobSubmissionResult submitJob(org.apache.flink.runtime.jobgraph.JobGraph jobGraph,
ClassLoader classLoader)
throws ProgramInvocationException
ClusterClientsubmitJob in class ClusterClient<StandaloneClusterId>jobGraph - The JobGraph to be submittedProgramInvocationExceptionCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.