Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements to register framework user #195

Merged
merged 2 commits into from
Mar 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ For local development and familiarizing yourself with Storm/Mesos, please see th
* `mesos.offer.expiry.multiplier`: Offer expiry multiplier for `nimbus.monitor.freq.secs`. Defaults to "2.5".
* `mesos.local.file.server.port`: Port for the local file server to bind to. Defaults to a random port.
* `mesos.framework.name`: Framework name. Defaults to "Storm!!!".
* `mesos.framework.user`: Framework user to run with Mesos. Defaults to user to run with Storm on Mesos.
* `mesos.framework.principal`: Framework principal to use to register with Mesos
* `mesos.framework.secret.file`: Location of file that contains the principal's secret. Secret cannot end with a NL.
* `mesos.prefer.reserved.resources`: Prefer reserved resources over unreserved (i.e., `"*"` role). Defaults to "true".
Expand Down
4 changes: 3 additions & 1 deletion storm/src/main/storm/mesos/MesosNimbus.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public class MesosNimbus implements INimbus {
public static final String CONF_MESOS_OFFER_EXPIRY_MULTIPLIER = "mesos.offer.expiry.multiplier";
public static final String CONF_MESOS_LOCAL_FILE_SERVER_PORT = "mesos.local.file.server.port";
public static final String CONF_MESOS_FRAMEWORK_NAME = "mesos.framework.name";
public static final String CONF_MESOS_FRAMEWORK_USER = "mesos.framework.user";
public static final String CONF_MESOS_PREFER_RESERVED_RESOURCES = "mesos.prefer.reserved.resources";
public static final String CONF_MESOS_CONTAINER_DOCKER_IMAGE = "mesos.container.docker.image";
public static final String CONF_MESOS_SUPERVISOR_STORM_LOCAL_DIR = "mesos.supervisor.storm.local.dir";
Expand Down Expand Up @@ -654,11 +655,12 @@ private FrameworkInfo.Builder createFrameworkBuilder() throws IOException {
String role = Optional.fromNullable((String) mesosStormConf.get(CONF_MESOS_ROLE)).or("*");
Boolean checkpoint = Optional.fromNullable((Boolean) mesosStormConf.get(CONF_MESOS_CHECKPOINT)).or(false);
String frameworkName = Optional.fromNullable((String) mesosStormConf.get(CONF_MESOS_FRAMEWORK_NAME)).or("Storm!!!");
String frameworkUser = Optional.fromNullable((String) mesosStormConf.get(CONF_MESOS_FRAMEWORK_USER)).or("");

FrameworkInfo.Builder finfo = FrameworkInfo.newBuilder()
.setName(frameworkName)
.setFailoverTimeout(failoverTimeout.doubleValue())
.setUser("")
.setUser(frameworkUser)
.setRole(role)
.setCheckpoint(checkpoint);

Expand Down