public class YarnClusterDescriptor extends Object implements org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>
| 构造器和说明 |
|---|
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 AutoCloseableclose 在接口中 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 在接口中 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 在接口中 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 在接口中 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 在接口中 org.apache.flink.client.deployment.ClusterDescriptor<org.apache.hadoop.yarn.api.records.ApplicationId>org.apache.flink.util.FlinkExceptionpublic String getClusterDescription()
getClusterDescription 在接口中 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.