public class StandaloneClusterClient extends ClusterClient<StandaloneClusterId>
ClusterClient.LazyActorSystemLoader
actorSystemLoader, flinkConfig, highAvailabilityServices, lastJobExecutionResult, log, MAX_SLOTS_UNKNOWN, timeout
Constructor and Description |
---|
StandaloneClusterClient(Configuration config) |
StandaloneClusterClient(Configuration config,
HighAvailabilityServices highAvailabilityServices,
boolean sharedHaServices) |
Modifier and Type | Method and Description |
---|---|
StandaloneClusterId |
getClusterId()
Returns the cluster id identifying the cluster to which the client is connected.
|
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.
|
JobSubmissionResult |
submitJob(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, triggerSavepoint
public StandaloneClusterClient(Configuration config) throws Exception
Exception
public StandaloneClusterClient(Configuration config, HighAvailabilityServices highAvailabilityServices, boolean sharedHaServices)
public void waitForClusterToBeReady()
ClusterClient
This 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()
ClusterClient
getWebInterfaceURL
in class ClusterClient<StandaloneClusterId>
public GetClusterStatusResponse getClusterStatus()
ClusterClient
getClusterStatus
in class ClusterClient<StandaloneClusterId>
public List<String> getNewMessages()
ClusterClient
getNewMessages
in class ClusterClient<StandaloneClusterId>
public StandaloneClusterId getClusterId()
ClusterClient
getClusterId
in class ClusterClient<StandaloneClusterId>
public int getMaxSlots()
ClusterClient
getMaxSlots
in class ClusterClient<StandaloneClusterId>
ClusterClient.MAX_SLOTS_UNKNOWN
) if unknownpublic boolean hasUserJarsInClassPath(List<URL> userJarFiles)
ClusterClient
hasUserJarsInClassPath
in class ClusterClient<StandaloneClusterId>
public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException
ClusterClient
submitJob
in class ClusterClient<StandaloneClusterId>
jobGraph
- The JobGraph to be submittedProgramInvocationException
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.