Skip to content

Commit

Permalink
[FLINK-5091] cleanup unused Mesos configuration entries
Browse files Browse the repository at this point in the history
  • Loading branch information
mxm committed Dec 16, 2016
1 parent 9da0b0e commit becd270
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,41 +491,11 @@ public final class ConfigConstants {

public static final String MESOS_RESOURCEMANAGER_FRAMEWORK_USER = "mesos.resourcemanager.framework.user";

/**
* The cpus to acquire from Mesos.
*
* By default, we use the number of requested task slots.
*/
public static final String MESOS_RESOURCEMANAGER_TASKS_CPUS = "mesos.resourcemanager.tasks.cpus";

/**
* The container image to use for task managers.
*/
public static final String MESOS_RESOURCEMANAGER_TASKS_CONTAINER_IMAGE_NAME =
"mesos.resourcemanager.tasks.container.image.name";

/**
* Config parameter to override SSL support for the Artifact Server
*/
public static final String MESOS_ARTIFACT_SERVER_SSL_ENABLED = "mesos.resourcemanager.artifactserver.ssl.enabled";

/**
* The type of container to use for task managers. Valid values are
* {@code MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_MESOS} or
* {@code MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_DOCKER}.
*/
public static final String MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE =
"mesos.resourcemanager.tasks.container.type";

/**
* Value for {@code MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE} setting. Tells to use the Mesos containerizer.
*/
public static final String MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_MESOS = "mesos";
/**
* Value for {@code MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE} setting. Tells to use the Docker containerizer.
*/
public static final String MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_DOCKER = "docker";

// ------------------------ Hadoop Configuration ------------------------

/**
Expand Down Expand Up @@ -1177,6 +1147,7 @@ public final class ConfigConstants {
public static final String DEFAULT_YARN_JOB_MANAGER_PORT = "0";

// ------ Mesos-Specific Configuration ------
// For more configuration entries please see {@code MesosTaskManagerParameters}.

/** The default failover timeout provided to Mesos (10 mins) */
public static final int DEFAULT_MESOS_FAILOVER_TIMEOUT_SECS = 10 * 60;
Expand All @@ -1198,8 +1169,6 @@ public final class ConfigConstants {
/** Default value to override SSL support for the Artifact Server */
public static final boolean DEFAULT_MESOS_ARTIFACT_SERVER_SSL_ENABLED = true;

public static final String DEFAULT_MESOS_RESOURCEMANAGER_TASKS_CONTAINER_IMAGE_TYPE = "mesos";

// ------------------------ File System Behavior ------------------------

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class LaunchableMesosWorker implements LaunchableTask {

/**
* Construct a launchable Mesos worker.
* @param resolver The resolver for retrieving artifacts (e.g. jars, configuration)
* @param params the TM parameters such as memory, cpu to acquire.
* @param containerSpec an abstract container specification for launch time.
* @param taskID the taskID for this worker.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ public class MesosTaskManagerParameters {
key("mesos.resourcemanager.tasks.container.image.name")
.noDefaultValue();

/**
* Value for {@code MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE} setting. Tells to use the Mesos containerizer.
*/
public static final String MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_MESOS = "mesos";
/**
* Value for {@code MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE} setting. Tells to use the Docker containerizer.
*/
public static final String MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_DOCKER = "docker";

private final double cpus;

private final ContainerType containerType;
Expand Down Expand Up @@ -139,10 +148,10 @@ public static MesosTaskManagerParameters create(Configuration flinkConfig) {
ContainerType containerType;
String containerTypeString = flinkConfig.getString(MESOS_RM_CONTAINER_TYPE);
switch(containerTypeString) {
case ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_MESOS:
case MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_MESOS:
containerType = ContainerType.MESOS;
break;
case ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_DOCKER:
case MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_DOCKER:
containerType = ContainerType.DOCKER;
if(imageName == null || imageName.length() == 0) {
throw new IllegalConfigurationException(MESOS_RM_CONTAINER_IMAGE_NAME.key() +
Expand Down

0 comments on commit becd270

Please sign in to comment.