public class YarnClusterDescriptor extends Object implements org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>
| Constructor and Description |
|---|
YarnClusterDescriptor(org.apache.flink.configuration.Configuration flinkConfiguration,
org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration,
org.apache.hadoop.yarn.client.api.YarnClient yarnClient,
YarnClusterInformationRetriever yarnClusterInformationRetriever,
boolean sharedYarnClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
addShipFiles(List<File> shipFiles)
Adds the given files to the list of files to ship.
|
void |
close() |
org.apache.flink.client.program.ClusterClientProvider<org.apache.hadoop.yarn.api.records.ApplicationId> |
deployJobCluster(org.apache.flink.client.deployment.ClusterSpecification clusterSpecification,
org.apache.flink.runtime.jobgraph.JobGraph jobGraph,
boolean detached) |
org.apache.flink.client.program.ClusterClientProvider<org.apache.hadoop.yarn.api.records.ApplicationId> |
deploySessionCluster(org.apache.flink.client.deployment.ClusterSpecification clusterSpecification) |
String |
getClusterDescription() |
org.apache.flink.configuration.Configuration |
getFlinkConfiguration() |
String |
getNodeLabel() |
org.apache.hadoop.yarn.client.api.YarnClient |
getYarnClient() |
protected String |
getYarnJobClusterEntrypoint()
The class to start the application master with.
|
protected String |
getYarnSessionClusterEntrypoint()
The class to start the application master with.
|
String |
getZookeeperNamespace() |
void |
killCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId) |
static void |
logDetachedClusterInformation(org.apache.hadoop.yarn.api.records.ApplicationId yarnApplicationId,
org.slf4j.Logger logger) |
org.apache.flink.client.program.ClusterClientProvider<org.apache.hadoop.yarn.api.records.ApplicationId> |
retrieve(org.apache.hadoop.yarn.api.records.ApplicationId applicationId) |
void |
setLocalJarPath(org.apache.hadoop.fs.Path localJarPath) |
public YarnClusterDescriptor(org.apache.flink.configuration.Configuration flinkConfiguration,
org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration,
org.apache.hadoop.yarn.client.api.YarnClient yarnClient,
YarnClusterInformationRetriever yarnClusterInformationRetriever,
boolean sharedYarnClient)
public org.apache.hadoop.yarn.client.api.YarnClient getYarnClient()
protected String getYarnSessionClusterEntrypoint()
protected String getYarnJobClusterEntrypoint()
public org.apache.flink.configuration.Configuration getFlinkConfiguration()
public void setLocalJarPath(org.apache.hadoop.fs.Path localJarPath)
public void addShipFiles(List<File> shipFiles)
Note that any file matching "flink-dist*.jar" will be excluded from the upload by
uploadAndRegisterFiles(Collection, FileSystem, Path, ApplicationId, List, Map, String, StringBuilder)
since we upload the Flink uber jar ourselves and do not need to deploy it multiple times.
shipFiles - files to shippublic String getZookeeperNamespace()
public String getNodeLabel()
public void close()
close in interface AutoCloseableclose in interface org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>public org.apache.flink.client.program.ClusterClientProvider<org.apache.hadoop.yarn.api.records.ApplicationId> retrieve(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
throws org.apache.flink.client.deployment.ClusterRetrieveException
retrieve in interface org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>org.apache.flink.client.deployment.ClusterRetrieveExceptionpublic org.apache.flink.client.program.ClusterClientProvider<org.apache.hadoop.yarn.api.records.ApplicationId> deploySessionCluster(org.apache.flink.client.deployment.ClusterSpecification clusterSpecification)
throws org.apache.flink.client.deployment.ClusterDeploymentException
deploySessionCluster in interface org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>org.apache.flink.client.deployment.ClusterDeploymentExceptionpublic org.apache.flink.client.program.ClusterClientProvider<org.apache.hadoop.yarn.api.records.ApplicationId> deployJobCluster(org.apache.flink.client.deployment.ClusterSpecification clusterSpecification,
org.apache.flink.runtime.jobgraph.JobGraph jobGraph,
boolean detached)
throws org.apache.flink.client.deployment.ClusterDeploymentException
deployJobCluster in interface org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>org.apache.flink.client.deployment.ClusterDeploymentExceptionpublic void killCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
throws org.apache.flink.util.FlinkException
killCluster in interface org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>org.apache.flink.util.FlinkExceptionpublic String getClusterDescription()
getClusterDescription in interface org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>public static void logDetachedClusterInformation(org.apache.hadoop.yarn.api.records.ApplicationId yarnApplicationId,
org.slf4j.Logger logger)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.