public class MesosConfiguration extends Object
Constructor and Description |
---|
MesosConfiguration(String masterUrl,
org.apache.mesos.Protos.FrameworkInfo.Builder frameworkInfo,
scala.Option<org.apache.mesos.Protos.Credential.Builder> credential) |
Modifier and Type | Method and Description |
---|---|
org.apache.mesos.SchedulerDriver |
createDriver(org.apache.mesos.Scheduler scheduler,
boolean implicitAcknowledgements)
Create the Mesos scheduler driver based on this configuration.
|
scala.Option<org.apache.mesos.Protos.Credential.Builder> |
credential()
The credential to authenticate the framework principal.
|
org.apache.mesos.Protos.FrameworkInfo.Builder |
frameworkInfo()
The framework registration info.
|
static void |
logMesosConfig(org.slf4j.Logger log,
MesosConfiguration config)
A utility method to log relevant Mesos connection info.
|
String |
masterUrl()
The Mesos connection string.
|
Set<String> |
roles()
Gets the roles associated with the framework.
|
String |
toString() |
MesosConfiguration |
withFrameworkInfo(org.apache.mesos.Protos.FrameworkInfo.Builder frameworkInfo)
Revise the configuration with updated framework info.
|
public MesosConfiguration(String masterUrl, org.apache.mesos.Protos.FrameworkInfo.Builder frameworkInfo, scala.Option<org.apache.mesos.Protos.Credential.Builder> credential)
public String masterUrl()
The value should be in one of the following forms:
host:port
zk://host1:port1,host2:port2,.../path
zk://username:password@host1:port1,host2:port2,.../path
file:///path/to/file (where file contains one of the above)
public org.apache.mesos.Protos.FrameworkInfo.Builder frameworkInfo()
public scala.Option<org.apache.mesos.Protos.Credential.Builder> credential()
public MesosConfiguration withFrameworkInfo(org.apache.mesos.Protos.FrameworkInfo.Builder frameworkInfo)
public org.apache.mesos.SchedulerDriver createDriver(org.apache.mesos.Scheduler scheduler, boolean implicitAcknowledgements)
scheduler
- the scheduler to use.implicitAcknowledgements
- whether to configure the driver for implicit acknowledgements.public static void logMesosConfig(org.slf4j.Logger log, MesosConfiguration config)
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.