public class MesosEntrypointUtils extends Object
Constructor and Description |
---|
MesosEntrypointUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
applyOverlays(Configuration configuration,
ContainerSpecification containerSpec)
Generate a container specification as a TaskManager template.
|
static ContainerSpecification |
createContainerSpec(Configuration configuration,
Configuration dynamicProperties) |
static MesosConfiguration |
createMesosSchedulerConfiguration(Configuration flinkConfig,
String hostname)
Loads and validates the Mesos scheduler configuration.
|
static MesosTaskManagerParameters |
createTmParameters(Configuration configuration,
org.slf4j.Logger log) |
static Configuration |
loadConfiguration(Configuration dynamicProperties,
org.slf4j.Logger log)
Loads the global configuration, adds the given dynamic properties configuration, and sets
the temp directory paths.
|
public static MesosConfiguration createMesosSchedulerConfiguration(Configuration flinkConfig, String hostname)
flinkConfig
- the global configuration.hostname
- the hostname to advertise to the Mesos master.public static MesosTaskManagerParameters createTmParameters(Configuration configuration, org.slf4j.Logger log)
public static ContainerSpecification createContainerSpec(Configuration configuration, Configuration dynamicProperties) throws Exception
Exception
public static void applyOverlays(Configuration configuration, ContainerSpecification containerSpec) throws IOException
This code is extremely Mesos-specific and registers all the artifacts that the TaskManager needs (such as JAR file, config file, ...) and all environment variables into a container specification. The Mesos fetcher then ensures that those artifacts will be copied into the task's sandbox directory. A lightweight HTTP server serves the artifacts to the fetcher.
IOException
public static Configuration loadConfiguration(Configuration dynamicProperties, org.slf4j.Logger log)
dynamicProperties
- dynamic properties to integratelog
- logger instanceCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.