Checks executor ports if they are within some range of the offered list of ports ranges,
Checks executor ports if they are within some range of the offered list of ports ranges,
the Spark Config
the list of ports to check
true if ports are within range false otherwise
Build a Mesos resource protobuf object
Build a Mesos resource protobuf object
Creates a new MesosSchedulerDriver that communicates to the Mesos master.
Creates a new MesosSchedulerDriver that communicates to the Mesos master.
The url to connect to Mesos master
the scheduler class to receive scheduler callbacks
User to impersonate with when running tasks
The framework name to display on the Mesos UI
Spark configuration
The WebUI url to link from Mesos UI
Option to checkpoint tasks for failover
Duration Mesos master expect scheduler to reconnect on disconnect
The id of the new framework
Return the amount of memory to allocate to each executor, taking into account container overheads.
Return the amount of memory to allocate to each executor, taking into account container overheads.
SparkContext to use to get spark.mesos.executor.memoryOverhead
value
memory requirement as (0.1 * <memoryOverhead>) or MEMORY_OVERHEAD_MINIMUM (whichever is larger)
Helper method to get the key,value-set pair for a Mesos Attribute protobuf
Helper method to get the key,value-set pair for a Mesos Attribute protobuf
Transforms a range resource to a list of ranges
Transforms a range resource to a list of ranges
the mesos resource list
the name of the resource
the list of ranges returned
Signal that the scheduler has registered with Mesos.
Signal that the scheduler has registered with Mesos.
Match the requirements (if any) to the offer attributes.
Match the requirements (if any) to the offer attributes. if attribute requirements are not specified - return true else if attribute is defined and no values are given, simple attribute presence is performed else if attribute name and value is specified, subset match is performed on slave attributes
The values of the non-zero ports to be used by the executor process.
The values of the non-zero ports to be used by the executor process.
the spark config to use
the ono-zero values of the ports
Parses the attributes constraints provided to spark and build a matching data struct: Map[<attribute-name>, Set[values-to-match]] The constraints are specified as ';' separated key-value pairs where keys and values are separated by ':'.
Parses the attributes constraints provided to spark and build a matching data struct: Map[<attribute-name>, Set[values-to-match]] The constraints are specified as ';' separated key-value pairs where keys and values are separated by ':'. The ':' implies equality (for singular values) and "is one of" for multiple values (comma separated). For example:
parseConstraintString("os:centos7;zone:us-east-1a,us-east-1b") // would result in <code> Map( "os" -> Set("centos7"), "zone": -> Set("us-east-1a", "us-east-1b") )
Mesos documentation: http://mesos.apache.org/documentation/attributes-resources/ https://github.com/apache/mesos/blob/master/src/common/values.cpp https://github.com/apache/mesos/blob/master/src/common/attributes.cpp
constaints string consisting of ';' separated key-value pairs (separated by ':')
Map of constraints to match resources offers.
Partitions port resources.
Partitions port resources.
non-zero ports to assign
the resources offered
resources left, port resources to be used.
Partition the existing set of resources into two groups, those remaining to be scheduled and those requested to be used for a new task.
Partition the existing set of resources into two groups, those remaining to be scheduled and those requested to be used for a new task.
The full list of available resources
The name of the resource to take from the available resources
The amount of resources to take from the available resources
The remaining resources list and the used resources list.
Starts the MesosSchedulerDriver and stores the current running driver to this new instance.
Starts the MesosSchedulerDriver and stores the current running driver to this new instance. This driver is expected to not be running. This method returns only after the scheduler has registered with Mesos.
Converts the attributes from the resource offer into a Map of name -> Attribute Value The attribute values are the mesos attribute types and they are
Converts the attributes from the resource offer into a Map of name -> Attribute Value The attribute values are the mesos attribute types and they are
the attributes offered
spark.mesos.driver.frameworkId is set by the cluster dispatcher to correlate driver submissions with frameworkIDs.
spark.mesos.driver.frameworkId is set by the cluster dispatcher to correlate driver submissions with frameworkIDs. However, this causes issues when a driver process launches more than one framework (more than one SparkContext(, because they all try to register with the same frameworkID. To enforce that only the first driver registers with the configured framework ID, the driver calls this method after the first registration.
Shared trait for implementing a Mesos Scheduler. This holds common state and helper methods and Mesos scheduler will use.