Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data MasterInfo = MasterInfo {
- masterInfoId' :: !ByteString
- masterInfoIp :: !Word32
- masterInfoPort :: !(Maybe Word32)
- masterInfoPid :: !(Maybe ByteString)
- masterInfoHostname :: !(Maybe ByteString)
- masterInfo :: ByteString -> Word32 -> MasterInfo
- data SlaveInfo = SlaveInfo {
- slaveInfoHostname :: !ByteString
- slaveInfoPort :: !(Maybe Word32)
- slaveInfoResources :: ![Resource]
- slaveInfoAttributes :: ![(ByteString, Value)]
- slaveInfoSlaveId :: !(Maybe SlaveID)
- slaveInfoCheckpoint :: !(Maybe Bool)
- slaveInfo :: ByteString -> [Resource] -> [(ByteString, Value)] -> SlaveInfo
- data ExecutorInfo = ExecutorInfo {
- executorInfoExecutorId :: !ExecutorID
- executorInfoFrameworkId :: !FrameworkID
- executorInfoCommandInfo :: !CommandInfo
- executorInfoContainerInfo :: !(Maybe ContainerInfo)
- executorInfoResources :: ![Resource]
- executorInfoName :: !(Maybe ByteString)
- executorInfoSource :: !(Maybe ByteString)
- executorInfoData :: !(Maybe ByteString)
- executorInfo :: ExecutorID -> FrameworkID -> CommandInfo -> [Resource] -> ExecutorInfo
- data FrameworkInfo = FrameworkInfo {
- frameworkInfoUser :: !ByteString
- frameworkInfoName :: !ByteString
- frameworkInfoId' :: !(Maybe FrameworkID)
- frameworkInfoFailoverTimeout :: !(Maybe Double)
- frameworkInfoCheckpoint :: !(Maybe Bool)
- frameworkInfoRole :: !(Maybe ByteString)
- frameworkInfoHostname :: !(Maybe ByteString)
- frameworkInfoPrincipal :: !(Maybe ByteString)
- frameworkInfo :: ByteString -> ByteString -> FrameworkInfo
- data Offer = Offer {
- offerId' :: !OfferID
- offerFrameworkId :: !FrameworkID
- offerSlaveId :: !SlaveID
- offerHostname :: !ByteString
- offerResources :: ![Resource]
- offerAttributes :: ![(ByteString, Value)]
- offerExecutorIds :: ![ExecutorID]
- data Request = Request {
- requestSlaveId :: !(Maybe SlaveID)
- requestResources :: ![Resource]
- newtype Filters = Filters {}
- filters :: Filters
- data TaskInfo = TaskInfo {}
- taskInfo :: ByteString -> TaskID -> SlaveID -> [Resource] -> TaskExecutionInfo -> TaskInfo
- data TaskExecutionInfo
- data CommandInfo = CommandInfo {
- commandInfoUris :: ![CommandURI]
- commandInfoEnvironment :: !(Maybe [(ByteString, ByteString)])
- commandInfoValue :: !CommandValue
- commandInfoUser :: !(Maybe ByteString)
- commandInfo :: CommandValue -> CommandInfo
- data CommandURI = CommandURI {
- commandURIValue :: !ByteString
- commandURIExecutable :: !(Maybe Bool)
- commandURIExtract :: !(Maybe Bool)
- commandURI :: ByteString -> CommandURI
- data CommandValue
- data Value
- = Scalar !Double
- | Ranges ![(Word64, Word64)]
- | Set ![ByteString]
- | Text !ByteString
- data Resource = Resource {
- resourceName :: !ByteString
- resourceValue :: !Value
- resourceRole :: !(Maybe ByteString)
- resource :: ByteString -> Value -> Resource
- data Status
- = NotStarted
- | Running
- | Aborted
- | Stopped
- data TaskStatus = TaskStatus {
- taskStatusTaskId :: !TaskID
- taskStatusState :: !TaskState
- taskStatusMessage :: !(Maybe ByteString)
- taskStatusData :: !(Maybe ByteString)
- taskStatusSlaveId :: !(Maybe SlaveID)
- taskStatusExecutorId :: !(Maybe ExecutorID)
- taskStatusTimestamp :: !(Maybe Double)
- taskStatusHealthy :: !(Maybe Bool)
- data TaskState
- isTerminal :: TaskState -> Bool
- newtype FrameworkID = FrameworkID {}
- newtype SlaveID = SlaveID {}
- newtype OfferID = OfferID {}
- newtype TaskID = TaskID {}
- newtype ExecutorID = ExecutorID {}
- newtype ContainerID = ContainerID {}
- data ContainerInfo = ContainerInfo {}
- data Volume = Volume {
- volumeContainerPath :: !ByteString
- volumeHostPath :: !(Maybe ByteString)
- volumeMode :: !Mode
- data Mode
- data ContainerType
- data HealthCheck = HealthCheck {}
- data HealthCheckStrategy
- data ResourceStatistics = ResourceStatistics {
- resourceStatisticsTimestamp :: !Double
- resourceStatisticsCpusUserTimeSecs :: !(Maybe Double)
- resourceStatisticsCpusSystemTimeSecs :: !(Maybe Double)
- resourceStatisticsCpusLimit :: !Double
- resourceStatisticsCpusPeriods :: !(Maybe Word32)
- resourceStatisticsCpusThrottled :: !(Maybe Word32)
- resourceStatisticsCpusThrottledTimeSecs :: !(Maybe Double)
- resourceStatisticsMemoryResidentSetSize :: !(Maybe Word64)
- resourceStatisticsMemoryLimitBytes :: !(Maybe Word64)
- resourceStatisticsMemoryFileBytes :: !(Maybe Word64)
- resourceStatisticsMemoryAnonymousBytes :: !(Maybe Word64)
- resourceStatisticsMemoryMappedFileBytes :: !(Maybe Word64)
- resourceStatisticsPerformanceStatistics :: !(Maybe PerformanceStatistics)
- resourceStatisticsNetRxPackets :: !(Maybe Word64)
- resourceStatisticsNetRxBytes :: !(Maybe Word64)
- resourceStatisticsNetRxErrors :: !(Maybe Word64)
- resourceStatisticsNetRxDropped :: !(Maybe Word64)
- resourceStatisticsNetTxPackets :: !(Maybe Word64)
- resourceStatisticsNetTxBytes :: !(Maybe Word64)
- resourceStatisticsNetTxErrors :: !(Maybe Word64)
- resourceStatisticsNetTxDropped :: !(Maybe Word64)
- data ResourceUsage = ResourceUsage {}
- data PerformanceStatistics = PerformanceStatistics {
- performanceStatisticsTimestamp :: !Double
- performanceStatisticsDuration :: !Double
- performanceStatisticsCycles :: !(Maybe Word64)
- performanceStatisticsStalledCyclesFrontend :: !(Maybe Word64)
- performanceStatisticsStalledCyclesBackend :: !(Maybe Word64)
- performanceStatisticsInstructions :: !(Maybe Word64)
- performanceStatisticsCacheReferences :: !(Maybe Word64)
- performanceStatisticsCacheMisses :: !(Maybe Word64)
- performanceStatisticsBranches :: !(Maybe Word64)
- performanceStatisticsBranchMisses :: !(Maybe Word64)
- performanceStatisticsBusCycles :: !(Maybe Word64)
- performanceStatisticsRefCycles :: !(Maybe Word64)
- performanceStatisticsCpuClock :: !(Maybe Double)
- performanceStatisticsTaskClock :: !(Maybe Double)
- performanceStatisticsPageFaults :: !(Maybe Word64)
- performanceStatisticsMinorFaults :: !(Maybe Word64)
- performanceStatisticsMajorFaults :: !(Maybe Word64)
- performanceStatisticsContextSwitches :: !(Maybe Word64)
- performanceStatisticsCpuMigrations :: !(Maybe Word64)
- performanceStatisticsAlignmentFaults :: !(Maybe Word64)
- performanceStatisticsEmulationFaults :: !(Maybe Word64)
- performanceStatisticsL1DcacheLoads :: !(Maybe Word64)
- performanceStatisticsL1DcacheLoadMisses :: !(Maybe Word64)
- performanceStatisticsL1DcacheStores :: !(Maybe Word64)
- performanceStatisticsL1DcacheStoreMisses :: !(Maybe Word64)
- performanceStatisticsL1DcachePrefetches :: !(Maybe Word64)
- performanceStatisticsL1DcachePrefetchMisses :: !(Maybe Word64)
- performanceStatisticsL1IcacheLoads :: !(Maybe Word64)
- performanceStatisticsL1IcacheLoadMisses :: !(Maybe Word64)
- performanceStatisticsL1IcachePrefetches :: !(Maybe Word64)
- performanceStatisticsL1IcachePrefetchMisses :: !(Maybe Word64)
- performanceStatisticsLlcLoads :: !(Maybe Word64)
- performanceStatisticsLlcLoadMisses :: !(Maybe Word64)
- performanceStatisticsLlcStores :: !(Maybe Word64)
- performanceStatisticsLlcStoreMisses :: !(Maybe Word64)
- performanceStatisticsLlcPrefetches :: !(Maybe Word64)
- performanceStatisticsLlcPrefetchMisses :: !(Maybe Word64)
- performanceStatisticsDtlbLoads :: !(Maybe Word64)
- performanceStatisticsDtlbLoadMisses :: !(Maybe Word64)
- performanceStatisticsDtlbStores :: !(Maybe Word64)
- performanceStatisticsDtlbStoreMisses :: !(Maybe Word64)
- performanceStatisticsDtlbPrefetches :: !(Maybe Word64)
- performanceStatisticsDtlbPrefetchMisses :: !(Maybe Word64)
- performanceStatisticsItlbLoads :: !(Maybe Word64)
- performanceStatisticsItlbLoadMisses :: !(Maybe Word64)
- performanceStatisticsBranchLoads :: !(Maybe Word64)
- performanceStatisticsBranchLoadMisses :: !(Maybe Word64)
- performanceStatisticsNodeLoads :: !(Maybe Word64)
- performanceStatisticsNodeLoadMisses :: !(Maybe Word64)
- performanceStatisticsNodeStores :: !(Maybe Word64)
- performanceStatisticsNodeStoreMisses :: !(Maybe Word64)
- performanceStatisticsNodePrefetches :: !(Maybe Word64)
- performanceStatisticsNodePrefetchMisses :: !(Maybe Word64)
- data Credential = Credential {}
- credential :: ByteString -> Credential
Core Framework & Executor types
Masters & Slaves
data MasterInfo Source
Describes a master. This will probably have more fields in the future which might be used, for example, to link a framework web UI to a master web UI.
MasterInfo | |
|
masterInfo :: ByteString -> Word32 -> MasterInfo Source
Describes a slave. Note that the slaveInfoSlaveID
field is only available after
a slave is registered with the master, and is made available here
to facilitate re-registration. If checkpoint is set, the slave is
checkpointing its own information and potentially frameworks'
information (if a framework has checkpointing enabled).
SlaveInfo | |
|
slaveInfo :: ByteString -> [Resource] -> [(ByteString, Value)] -> SlaveInfo Source
Frameworks & Executors
data ExecutorInfo Source
ExecutorInfo | |
|
executorInfo :: ExecutorID -> FrameworkID -> CommandInfo -> [Resource] -> ExecutorInfo Source
data FrameworkInfo Source
Describes a framework. If the user field is set to an empty string
Mesos will automagically set it to the current user. Note that the
ID is only available after a framework has registered, however, it
is included here in order to facilitate scheduler failover (i.e.,
if it is set then the SchedulerDriver
expects the scheduler is
performing failover). The amount of time that the master will wait
for the scheduler to failover before removing the framework is
specified by frameworkFailoverTimeout
.
If frameworkCheckpoint
is set, framework pid, executor pids and status updates
are checkpointed to disk by the slaves.
Checkpointing allows a restarted slave to reconnect with old executors
and recover status updates, at the cost of disk I/O.
The frameworkRole
field is used to group frameworks for allocation decisions,
depending on the allocation policy being used.
If the frameworkHostname
field is set to an empty string Mesos will
automagically set it to the current hostname.
frameworkInfo :: ByteString -> ByteString -> FrameworkInfo Source
Resource allocation
Describes some resources available on a slave. An offer only contains resources from a single slave.
Offer | |
|
Describes a request for resources that can be used by a framework to proactively influence the allocator.
Request | |
|
Filters | |
|
Launching Tasks
Describes a task. Passed from the scheduler all the way to an executor (see SchedulerDriver::launchTasks and Executor::launchTask).
A different executor can be used to launch this task, and subsequent tasks meant for the same executor can reuse the same ExecutorInfo struct.
TaskInfo | |
|
taskInfo :: ByteString -> TaskID -> SlaveID -> [Resource] -> TaskExecutionInfo -> TaskInfo Source
data TaskExecutionInfo Source
data CommandInfo Source
Describes a command, executed via:
/bin/sh -c value
Any URIs specified are fetched before executing the command. If the executable field for an uri is set, executable file permission is set on the downloaded file. Otherwise, if the downloaded file has a recognized archive extension (currently [compressed] tar and zip) it is extracted into the executor's working directory. In addition, any environment variables are set before executing the command (so they can be used to "parameterize" your command).
CommandInfo | |
|
data CommandURI Source
CommandURI | |
|
commandURI :: ByteString -> CommandURI Source
data CommandValue Source
Scalar !Double | |
Ranges ![(Word64, Word64)] | |
Set ![ByteString] | |
Text !ByteString |
Describes a resource on a machine. A resource can take on one of three types: scalar (double), a list of finite and discrete ranges (e.g., [1-10, 20-30]), or a set of items.
N.B. there is a slight deviation from the C++ API: the Haskell bindings convert Text
values
into a single element Set
value in order to avoid having to expose yet another data type.
Resource | |
|
resource :: ByteString -> Value -> Resource Source
Task & Executor Status Updates
Indicates the state of the scheduler and executor driver after function calls.
data TaskStatus Source
Describes the current status of a task.
TaskStatus | |
|
Describes possible task states. IMPORTANT: Mesos assumes tasks that enter terminal states (see below) imply the task is no longer running and thus clean up any thing associated with the task (ultimately offering any resources being consumed by that task to another task).
isTerminal :: TaskState -> Bool Source
Identifiers
newtype FrameworkID Source
A unique ID assigned to a framework. A framework can reuse this ID in order to do failover.
A unique ID assigned to a slave. Currently, a slave gets a new ID whenever it (re)registers with Mesos. Framework writers shouldn't assume any binding between a slave ID and and a hostname.
A unique ID assigned to an offer.
A framework generated ID to distinguish a task. The ID must remain
unique while the task is active. However, a framework can reuse an
ID _only_ if a previous task with the same ID has reached a
terminal state (e.g., Finished
, Lost
, Killed
, etc.). See isTerminal
for a utility function to simplify checking task state.
newtype ExecutorID Source
A framework generated ID to distinguish an executor. Only one executor with the same ID can be active on the same slave at a time.
newtype ContainerID Source
A slave generated ID to distinguish a container. The ID must be unique between any active or completed containers on the slave. In particular, containers for different runs of the same (framework, executor) pair must be unique.
Containerization Support
data ContainerInfo Source
Volume | |
|
data ContainerType Source
Health Checks
data HealthCheck Source
HealthCheck | |
|
data HealthCheckStrategy Source
HTTPCheck | |
| |
CommandCheck | |
|
Resource Usage & Performance Statistics
data ResourceStatistics Source
data ResourceUsage Source
Describes a snapshot of the resource usage for an executor.
Resource usage is for an executor. For tasks launched with an explicit executor, the executor id is provided. For tasks launched without an executor, our internal executor will be used. In this case, we provide the task id here instead, in order to make this message easier for schedulers to work with.
ResourceUsage | |
|
data PerformanceStatistics Source
Task Status
Credentials & ACLs
data Credential Source
Credential used for authentication.
NOTE: credentialPrincipal
is used for authenticating the framework with
the master. This is different from frameworkUser
which is used to determine the user under which the framework's
executors/tasks are run.
credential :: ByteString -> Credential Source