public class YarnClusterClient extends ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
ClusterClient.LazyActorSystemLoader
actorSystemLoader, flinkConfig, highAvailabilityServices, lastJobExecutionResult, log, MAX_SLOTS_UNKNOWN, timeout
Constructor and Description |
---|
YarnClusterClient(AbstractYarnClusterDescriptor clusterDescriptor,
int numberTaskManagers,
int slotsPerTaskManager,
org.apache.hadoop.yarn.api.records.ApplicationReport appReport,
Configuration flinkConfig,
boolean newlyCreatedCluster)
Create a new Flink on YARN cluster.
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId() |
org.apache.hadoop.yarn.api.records.ApplicationId |
getClusterId()
Returns the cluster id identifying the cluster to which the client is connected.
|
GetClusterStatusResponse |
getClusterStatus()
This method is only available if the cluster hasn't been started in detached mode.
|
Configuration |
getFlinkConfiguration()
Return the Flink configuration object.
|
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.
|
boolean |
isDetached()
A flag to indicate whether this clients submits jobs detached.
|
void |
shutDownCluster() |
JobSubmissionResult |
submitJob(JobGraph jobGraph,
ClassLoader classLoader)
Calls the subclasses' submitJob method.
|
void |
waitForClusterToBeReady()
Blocks until all TaskManagers are connected to the JobManager.
|
cancel, cancelWithSavepoint, connectToJob, disposeSavepoint, endSession, endSessions, getAccumulators, getAccumulators, getClusterConnectionInfo, getJobGraph, getJobGraph, getJobManagerGateway, getJobStatus, getOptimizedPlan, getOptimizedPlan, getOptimizedPlanAsJson, getPrintStatusDuringExecution, listJobs, logAndSysout, rescaleJob, retrieveJob, run, run, run, run, run, run, runDetached, setDetached, setPrintStatusDuringExecution, shutdown, stop, triggerSavepoint
public YarnClusterClient(AbstractYarnClusterDescriptor clusterDescriptor, int numberTaskManagers, int slotsPerTaskManager, org.apache.hadoop.yarn.api.records.ApplicationReport appReport, Configuration flinkConfig, boolean newlyCreatedCluster) throws Exception
clusterDescriptor
- The descriptor used at cluster creationnumberTaskManagers
- The number of task managers, -1 if unknownslotsPerTaskManager
- Slots per task manager, -1 if unknownappReport
- the YARN application IDflinkConfig
- Flink configurationnewlyCreatedCluster
- Indicator whether this cluster has just been createdIOException
org.apache.hadoop.yarn.exceptions.YarnException
Exception
public Configuration getFlinkConfiguration()
ClusterClient
getFlinkConfiguration
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public int getMaxSlots()
ClusterClient
getMaxSlots
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
ClusterClient.MAX_SLOTS_UNKNOWN
) if unknownpublic boolean hasUserJarsInClassPath(List<URL> userJarFiles)
ClusterClient
hasUserJarsInClassPath
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException
ClusterClient
submitJob
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
jobGraph
- The JobGraph to be submittedProgramInvocationException
public String getWebInterfaceURL()
ClusterClient
getWebInterfaceURL
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public GetClusterStatusResponse getClusterStatus()
getClusterStatus
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public List<String> getNewMessages()
ClusterClient
getNewMessages
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public org.apache.hadoop.yarn.api.records.ApplicationId getClusterId()
ClusterClient
getClusterId
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public boolean isDetached()
ClusterClient
isDetached
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public void waitForClusterToBeReady()
waitForClusterToBeReady
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public void shutDownCluster()
shutDownCluster
in class ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.