public class YarnClusterClient
extends org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>
| Constructor and Description |
|---|
YarnClusterClient(AbstractYarnClusterDescriptor clusterDescriptor,
int numberTaskManagers,
int slotsPerTaskManager,
org.apache.hadoop.yarn.api.records.ApplicationReport appReport,
org.apache.flink.configuration.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() |
org.apache.flink.runtime.clusterframework.messages.GetClusterStatusResponse |
getClusterStatus()
This method is only available if the cluster hasn't been started in detached mode.
|
org.apache.flink.configuration.Configuration |
getFlinkConfiguration() |
int |
getMaxSlots() |
List<String> |
getNewMessages() |
String |
getWebInterfaceURL() |
boolean |
hasUserJarsInClassPath(List<URL> userJarFiles) |
boolean |
isDetached() |
void |
shutDownCluster() |
org.apache.flink.api.common.JobSubmissionResult |
submitJob(org.apache.flink.runtime.jobgraph.JobGraph jobGraph,
ClassLoader classLoader) |
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, triggerSavepointpublic YarnClusterClient(AbstractYarnClusterDescriptor clusterDescriptor, int numberTaskManagers, int slotsPerTaskManager, org.apache.hadoop.yarn.api.records.ApplicationReport appReport, org.apache.flink.configuration.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 createdIOExceptionorg.apache.hadoop.yarn.exceptions.YarnExceptionExceptionpublic org.apache.flink.configuration.Configuration getFlinkConfiguration()
getFlinkConfiguration in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public int getMaxSlots()
getMaxSlots in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public boolean hasUserJarsInClassPath(List<URL> userJarFiles)
hasUserJarsInClassPath in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public org.apache.flink.api.common.JobSubmissionResult submitJob(org.apache.flink.runtime.jobgraph.JobGraph jobGraph,
ClassLoader classLoader)
throws org.apache.flink.client.program.ProgramInvocationException
submitJob in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>org.apache.flink.client.program.ProgramInvocationExceptionpublic String getWebInterfaceURL()
getWebInterfaceURL in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public org.apache.flink.runtime.clusterframework.messages.GetClusterStatusResponse getClusterStatus()
getClusterStatus in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public List<String> getNewMessages()
getNewMessages in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public org.apache.hadoop.yarn.api.records.ApplicationId getClusterId()
getClusterId in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public boolean isDetached()
isDetached in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public void waitForClusterToBeReady()
waitForClusterToBeReady in class org.apache.flink.client.program.ClusterClient<org.apache.hadoop.yarn.api.records.ApplicationId>public void shutDownCluster()
shutDownCluster in class org.apache.flink.client.program.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.