public abstract class AbstractYarnClusterDescriptor extends Object implements ClusterDescriptor<YarnClusterClient>
YarnClusterClient
.Modifier and Type | Field and Description |
---|---|
protected List<File> |
shipFiles
Lazily initialized list of files to ship
|
Constructor and Description |
---|
AbstractYarnClusterDescriptor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addLibFolderToShipFiles(Set<File> effectiveShipFiles) |
void |
addShipFiles(List<File> shipFiles) |
protected YarnClusterClient |
createYarnClusterClient(AbstractYarnClusterDescriptor descriptor,
org.apache.hadoop.yarn.client.api.YarnClient yarnClient,
org.apache.hadoop.yarn.api.records.ApplicationReport report,
Configuration flinkConfiguration,
org.apache.hadoop.fs.Path sessionFilesDir,
boolean perJobCluster)
Creates a YarnClusterClient; may be overriden in tests
|
YarnClusterClient |
deploy()
Triggers deployment of a cluster
|
protected YarnClusterClient |
deployInternal()
This method will block until the ApplicationMaster/JobManager have been
deployed on YARN.
|
protected abstract Class<?> |
getApplicationMasterClass()
The class to bootstrap the application master of the Yarn cluster (runs main method).
|
String |
getClusterDescription()
Returns a String containing details about the cluster (NodeManagers, available memory, ...)
|
String |
getDynamicPropertiesEncoded() |
Configuration |
getFlinkConfiguration() |
String |
getSessionFilesDir() |
int |
getTaskManagerCount() |
int |
getTaskManagerSlots() |
protected org.apache.hadoop.yarn.client.api.YarnClient |
getYarnClient()
Gets a Hadoop Yarn client
|
String |
getZookeeperNamespace() |
boolean |
isDetachedMode() |
YarnClusterClient |
retrieve(String applicationID)
Retrieves an existing Flink Cluster.
|
void |
setConfigurationDirectory(String configurationDirectory) |
void |
setConfigurationFilePath(org.apache.hadoop.fs.Path confPath) |
void |
setDetachedMode(boolean detachedMode) |
void |
setDynamicPropertiesEncoded(String dynamicPropertiesEncoded) |
void |
setFlinkConfiguration(Configuration conf) |
void |
setJobManagerMemory(int memoryMb) |
void |
setLocalJarPath(org.apache.hadoop.fs.Path localJarPath) |
void |
setName(String name) |
void |
setQueue(String queue) |
void |
setTaskManagerCount(int tmCount) |
void |
setTaskManagerMemory(int memoryMb) |
void |
setTaskManagerSlots(int slots) |
protected org.apache.hadoop.yarn.api.records.ContainerLaunchContext |
setupApplicationMasterContainer(boolean hasLogback,
boolean hasLog4j) |
void |
setZookeeperNamespace(String zookeeperNamespace) |
protected abstract Class<?> getApplicationMasterClass()
public void setJobManagerMemory(int memoryMb)
public void setTaskManagerMemory(int memoryMb)
public void setFlinkConfiguration(Configuration conf)
public Configuration getFlinkConfiguration()
public void setTaskManagerSlots(int slots)
public int getTaskManagerSlots()
public void setQueue(String queue)
public void setLocalJarPath(org.apache.hadoop.fs.Path localJarPath)
public void setConfigurationFilePath(org.apache.hadoop.fs.Path confPath)
public void setConfigurationDirectory(String configurationDirectory)
public void setTaskManagerCount(int tmCount)
public int getTaskManagerCount()
public void setDynamicPropertiesEncoded(String dynamicPropertiesEncoded)
public String getDynamicPropertiesEncoded()
public void setDetachedMode(boolean detachedMode)
public boolean isDetachedMode()
public String getZookeeperNamespace()
public void setZookeeperNamespace(String zookeeperNamespace)
protected org.apache.hadoop.yarn.client.api.YarnClient getYarnClient()
public YarnClusterClient retrieve(String applicationID)
ClusterDescriptor
retrieve
in interface ClusterDescriptor<YarnClusterClient>
applicationID
- The unique application identifier of the running clusterpublic YarnClusterClient deploy()
ClusterDescriptor
deploy
in interface ClusterDescriptor<YarnClusterClient>
protected YarnClusterClient deployInternal() throws Exception
Exception
public String getClusterDescription()
ClusterDescriptor
getClusterDescription
in interface ClusterDescriptor<YarnClusterClient>
public String getSessionFilesDir()
public void setName(String name)
protected org.apache.hadoop.yarn.api.records.ContainerLaunchContext setupApplicationMasterContainer(boolean hasLogback, boolean hasLog4j)
protected YarnClusterClient createYarnClusterClient(AbstractYarnClusterDescriptor descriptor, org.apache.hadoop.yarn.client.api.YarnClient yarnClient, org.apache.hadoop.yarn.api.records.ApplicationReport report, Configuration flinkConfiguration, org.apache.hadoop.fs.Path sessionFilesDir, boolean perJobCluster) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
IOException
org.apache.hadoop.yarn.exceptions.YarnException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.