scheduler

package
v1.3.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2016 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package scheduler is a generated protocol buffer package.

It is generated from these files:

scheduler/scheduler.proto

It has these top-level messages:

Event
Call

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthScheduler = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowScheduler   = fmt.Errorf("proto: integer overflow")
)
View Source
var Call_Type_name = map[int32]string{
	1:  "SUBSCRIBE",
	2:  "TEARDOWN",
	3:  "ACCEPT",
	4:  "DECLINE",
	5:  "REVIVE",
	6:  "KILL",
	7:  "SHUTDOWN",
	8:  "ACKNOWLEDGE",
	9:  "RECONCILE",
	10: "MESSAGE",
	11: "REQUEST",
	12: "SUPPRESS",
}
View Source
var Call_Type_value = map[string]int32{
	"SUBSCRIBE":   1,
	"TEARDOWN":    2,
	"ACCEPT":      3,
	"DECLINE":     4,
	"REVIVE":      5,
	"KILL":        6,
	"SHUTDOWN":    7,
	"ACKNOWLEDGE": 8,
	"RECONCILE":   9,
	"MESSAGE":     10,
	"REQUEST":     11,
	"SUPPRESS":    12,
}
View Source
var Event_Type_name = map[int32]string{
	1: "SUBSCRIBED",
	2: "OFFERS",
	3: "RESCIND",
	4: "UPDATE",
	5: "MESSAGE",
	6: "FAILURE",
	7: "ERROR",
	8: "HEARTBEAT",
}
View Source
var Event_Type_value = map[string]int32{
	"SUBSCRIBED": 1,
	"OFFERS":     2,
	"RESCIND":    3,
	"UPDATE":     4,
	"MESSAGE":    5,
	"FAILURE":    6,
	"ERROR":      7,
	"HEARTBEAT":  8,
}

Functions

This section is empty.

Types

type Call

type Call struct {
	// Identifies who generated this call. Master assigns a framework id
	// when a new scheduler subscribes for the first time. Once assigned,
	// the scheduler must set the 'framework_id' here and within its
	// FrameworkInfo (in any further 'Subscribe' calls). This allows the
	// master to identify a scheduler correctly across disconnections,
	// failovers, etc.
	FrameworkId *mesosproto.FrameworkID `protobuf:"bytes,1,opt,name=framework_id" json:"framework_id,omitempty"`
	// Type of the call, indicates which optional field below should be
	// present if that type has a nested message definition.
	Type             *Call_Type        `protobuf:"varint,2,req,name=type,enum=mesosproto.scheduler.Call_Type" json:"type,omitempty"`
	Subscribe        *Call_Subscribe   `protobuf:"bytes,3,opt,name=subscribe" json:"subscribe,omitempty"`
	Accept           *Call_Accept      `protobuf:"bytes,4,opt,name=accept" json:"accept,omitempty"`
	Decline          *Call_Decline     `protobuf:"bytes,5,opt,name=decline" json:"decline,omitempty"`
	Kill             *Call_Kill        `protobuf:"bytes,6,opt,name=kill" json:"kill,omitempty"`
	Shutdown         *Call_Shutdown    `protobuf:"bytes,7,opt,name=shutdown" json:"shutdown,omitempty"`
	Acknowledge      *Call_Acknowledge `protobuf:"bytes,8,opt,name=acknowledge" json:"acknowledge,omitempty"`
	Reconcile        *Call_Reconcile   `protobuf:"bytes,9,opt,name=reconcile" json:"reconcile,omitempty"`
	Message          *Call_Message     `protobuf:"bytes,10,opt,name=message" json:"message,omitempty"`
	Request          *Call_Request     `protobuf:"bytes,11,opt,name=request" json:"request,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

* Scheduler call API.

Like Event, a Call is described using the standard protocol buffer "union" trick (see above).

func NewPopulatedCall

func NewPopulatedCall(r randyScheduler, easy bool) *Call

func (*Call) Equal

func (this *Call) Equal(that interface{}) bool

func (*Call) GetAccept

func (m *Call) GetAccept() *Call_Accept

func (*Call) GetAcknowledge

func (m *Call) GetAcknowledge() *Call_Acknowledge

func (*Call) GetDecline

func (m *Call) GetDecline() *Call_Decline

func (*Call) GetFrameworkId

func (m *Call) GetFrameworkId() *mesosproto.FrameworkID

func (*Call) GetKill

func (m *Call) GetKill() *Call_Kill

func (*Call) GetMessage

func (m *Call) GetMessage() *Call_Message

func (*Call) GetReconcile

func (m *Call) GetReconcile() *Call_Reconcile

func (*Call) GetRequest

func (m *Call) GetRequest() *Call_Request

func (*Call) GetShutdown

func (m *Call) GetShutdown() *Call_Shutdown

func (*Call) GetSubscribe

func (m *Call) GetSubscribe() *Call_Subscribe

func (*Call) GetType

func (m *Call) GetType() Call_Type

func (*Call) GoString

func (this *Call) GoString() string

func (*Call) Marshal

func (m *Call) Marshal() (data []byte, err error)

func (*Call) MarshalTo

func (m *Call) MarshalTo(data []byte) (int, error)

func (*Call) ProtoMessage

func (*Call) ProtoMessage()

func (*Call) Reset

func (m *Call) Reset()

func (*Call) Size

func (m *Call) Size() (n int)

func (*Call) String

func (this *Call) String() string

func (*Call) Unmarshal

func (m *Call) Unmarshal(data []byte) error

func (*Call) VerboseEqual

func (this *Call) VerboseEqual(that interface{}) error

type Call_Accept

type Call_Accept struct {
	OfferIds         []*mesosproto.OfferID         `protobuf:"bytes,1,rep,name=offer_ids" json:"offer_ids,omitempty"`
	Operations       []*mesosproto.Offer_Operation `protobuf:"bytes,2,rep,name=operations" json:"operations,omitempty"`
	Filters          *mesosproto.Filters           `protobuf:"bytes,3,opt,name=filters" json:"filters,omitempty"`
	XXX_unrecognized []byte                        `json:"-"`
}

Accepts an offer, performing the specified operations in a sequential manner.

E.g. Launch a task with a newly reserved persistent volume:

Accept {
  offer_ids: [ ... ]
  operations: [
    { type: RESERVE,
      reserve: { resources: [ disk(role):2 ] } }
    { type: CREATE,
      create: { volumes: [ disk(role):1+persistence ] } }
    { type: LAUNCH,
      launch: { task_infos ... disk(role):1;disk(role):1+persistence } }
  ]
}

Note that any of the offer’s resources not used in the 'Accept' call (e.g., to launch a task) are considered unused and might be reoffered to other frameworks. In other words, the same OfferID cannot be used in more than one 'Accept' call.

func NewPopulatedCall_Accept

func NewPopulatedCall_Accept(r randyScheduler, easy bool) *Call_Accept

func (*Call_Accept) Equal

func (this *Call_Accept) Equal(that interface{}) bool

func (*Call_Accept) GetFilters

func (m *Call_Accept) GetFilters() *mesosproto.Filters

func (*Call_Accept) GetOfferIds

func (m *Call_Accept) GetOfferIds() []*mesosproto.OfferID

func (*Call_Accept) GetOperations

func (m *Call_Accept) GetOperations() []*mesosproto.Offer_Operation

func (*Call_Accept) GoString

func (this *Call_Accept) GoString() string

func (*Call_Accept) Marshal

func (m *Call_Accept) Marshal() (data []byte, err error)

func (*Call_Accept) MarshalTo

func (m *Call_Accept) MarshalTo(data []byte) (int, error)

func (*Call_Accept) ProtoMessage

func (*Call_Accept) ProtoMessage()

func (*Call_Accept) Reset

func (m *Call_Accept) Reset()

func (*Call_Accept) Size

func (m *Call_Accept) Size() (n int)

func (*Call_Accept) String

func (this *Call_Accept) String() string

func (*Call_Accept) Unmarshal

func (m *Call_Accept) Unmarshal(data []byte) error

func (*Call_Accept) VerboseEqual

func (this *Call_Accept) VerboseEqual(that interface{}) error

type Call_Acknowledge

type Call_Acknowledge struct {
	SlaveId          *mesosproto.SlaveID `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"`
	TaskId           *mesosproto.TaskID  `protobuf:"bytes,2,req,name=task_id" json:"task_id,omitempty"`
	Uuid             []byte              `protobuf:"bytes,3,req,name=uuid" json:"uuid,omitempty"`
	XXX_unrecognized []byte              `json:"-"`
}

Acknowledges the receipt of status update. Schedulers are responsible for explicitly acknowledging the receipt of status updates that have 'Update.status().uuid()' field set. Such status updates are retried by the slave until they are acknowledged by the scheduler.

func NewPopulatedCall_Acknowledge

func NewPopulatedCall_Acknowledge(r randyScheduler, easy bool) *Call_Acknowledge

func (*Call_Acknowledge) Equal

func (this *Call_Acknowledge) Equal(that interface{}) bool

func (*Call_Acknowledge) GetSlaveId

func (m *Call_Acknowledge) GetSlaveId() *mesosproto.SlaveID

func (*Call_Acknowledge) GetTaskId

func (m *Call_Acknowledge) GetTaskId() *mesosproto.TaskID

func (*Call_Acknowledge) GetUuid

func (m *Call_Acknowledge) GetUuid() []byte

func (*Call_Acknowledge) GoString

func (this *Call_Acknowledge) GoString() string

func (*Call_Acknowledge) Marshal

func (m *Call_Acknowledge) Marshal() (data []byte, err error)

func (*Call_Acknowledge) MarshalTo

func (m *Call_Acknowledge) MarshalTo(data []byte) (int, error)

func (*Call_Acknowledge) ProtoMessage

func (*Call_Acknowledge) ProtoMessage()

func (*Call_Acknowledge) Reset

func (m *Call_Acknowledge) Reset()

func (*Call_Acknowledge) Size

func (m *Call_Acknowledge) Size() (n int)

func (*Call_Acknowledge) String

func (this *Call_Acknowledge) String() string

func (*Call_Acknowledge) Unmarshal

func (m *Call_Acknowledge) Unmarshal(data []byte) error

func (*Call_Acknowledge) VerboseEqual

func (this *Call_Acknowledge) VerboseEqual(that interface{}) error

type Call_Decline

type Call_Decline struct {
	OfferIds         []*mesosproto.OfferID `protobuf:"bytes,1,rep,name=offer_ids" json:"offer_ids,omitempty"`
	Filters          *mesosproto.Filters   `protobuf:"bytes,2,opt,name=filters" json:"filters,omitempty"`
	XXX_unrecognized []byte                `json:"-"`
}

Declines an offer, signaling the master to potentially reoffer the resources to a different framework. Note that this is same as sending an Accept call with no operations. See comments on top of 'Accept' for semantics.

func NewPopulatedCall_Decline

func NewPopulatedCall_Decline(r randyScheduler, easy bool) *Call_Decline

func (*Call_Decline) Equal

func (this *Call_Decline) Equal(that interface{}) bool

func (*Call_Decline) GetFilters

func (m *Call_Decline) GetFilters() *mesosproto.Filters

func (*Call_Decline) GetOfferIds

func (m *Call_Decline) GetOfferIds() []*mesosproto.OfferID

func (*Call_Decline) GoString

func (this *Call_Decline) GoString() string

func (*Call_Decline) Marshal

func (m *Call_Decline) Marshal() (data []byte, err error)

func (*Call_Decline) MarshalTo

func (m *Call_Decline) MarshalTo(data []byte) (int, error)

func (*Call_Decline) ProtoMessage

func (*Call_Decline) ProtoMessage()

func (*Call_Decline) Reset

func (m *Call_Decline) Reset()

func (*Call_Decline) Size

func (m *Call_Decline) Size() (n int)

func (*Call_Decline) String

func (this *Call_Decline) String() string

func (*Call_Decline) Unmarshal

func (m *Call_Decline) Unmarshal(data []byte) error

func (*Call_Decline) VerboseEqual

func (this *Call_Decline) VerboseEqual(that interface{}) error

type Call_Kill

type Call_Kill struct {
	TaskId           *mesosproto.TaskID  `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"`
	SlaveId          *mesosproto.SlaveID `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"`
	XXX_unrecognized []byte              `json:"-"`
}

Kills a specific task. If the scheduler has a custom executor, the kill is forwarded to the executor and it is up to the executor to kill the task and send a TASK_KILLED (or TASK_FAILED) update. Note that Mesos releases the resources for a task once it receives a terminal update (See TaskState in mesos.proto) for it. If the task is unknown to the master, a TASK_LOST update is generated.

func NewPopulatedCall_Kill

func NewPopulatedCall_Kill(r randyScheduler, easy bool) *Call_Kill

func (*Call_Kill) Equal

func (this *Call_Kill) Equal(that interface{}) bool

func (*Call_Kill) GetSlaveId

func (m *Call_Kill) GetSlaveId() *mesosproto.SlaveID

func (*Call_Kill) GetTaskId

func (m *Call_Kill) GetTaskId() *mesosproto.TaskID

func (*Call_Kill) GoString

func (this *Call_Kill) GoString() string

func (*Call_Kill) Marshal

func (m *Call_Kill) Marshal() (data []byte, err error)

func (*Call_Kill) MarshalTo

func (m *Call_Kill) MarshalTo(data []byte) (int, error)

func (*Call_Kill) ProtoMessage

func (*Call_Kill) ProtoMessage()

func (*Call_Kill) Reset

func (m *Call_Kill) Reset()

func (*Call_Kill) Size

func (m *Call_Kill) Size() (n int)

func (*Call_Kill) String

func (this *Call_Kill) String() string

func (*Call_Kill) Unmarshal

func (m *Call_Kill) Unmarshal(data []byte) error

func (*Call_Kill) VerboseEqual

func (this *Call_Kill) VerboseEqual(that interface{}) error

type Call_Message

type Call_Message struct {
	SlaveId          *mesosproto.SlaveID    `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"`
	ExecutorId       *mesosproto.ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"`
	Data             []byte                 `protobuf:"bytes,3,req,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

Sends arbitrary binary data to the executor. Note that Mesos neither interprets this data nor makes any guarantees about the delivery of this message to the executor.

func NewPopulatedCall_Message

func NewPopulatedCall_Message(r randyScheduler, easy bool) *Call_Message

func (*Call_Message) Equal

func (this *Call_Message) Equal(that interface{}) bool

func (*Call_Message) GetData

func (m *Call_Message) GetData() []byte

func (*Call_Message) GetExecutorId

func (m *Call_Message) GetExecutorId() *mesosproto.ExecutorID

func (*Call_Message) GetSlaveId

func (m *Call_Message) GetSlaveId() *mesosproto.SlaveID

func (*Call_Message) GoString

func (this *Call_Message) GoString() string

func (*Call_Message) Marshal

func (m *Call_Message) Marshal() (data []byte, err error)

func (*Call_Message) MarshalTo

func (m *Call_Message) MarshalTo(data []byte) (int, error)

func (*Call_Message) ProtoMessage

func (*Call_Message) ProtoMessage()

func (*Call_Message) Reset

func (m *Call_Message) Reset()

func (*Call_Message) Size

func (m *Call_Message) Size() (n int)

func (*Call_Message) String

func (this *Call_Message) String() string

func (*Call_Message) Unmarshal

func (m *Call_Message) Unmarshal(data []byte) error

func (*Call_Message) VerboseEqual

func (this *Call_Message) VerboseEqual(that interface{}) error

type Call_Reconcile

type Call_Reconcile struct {
	Tasks            []*Call_Reconcile_Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

Allows the scheduler to query the status for non-terminal tasks. This causes the master to send back the latest task status for each task in 'tasks', if possible. Tasks that are no longer known will result in a TASK_LOST update. If 'statuses' is empty, then the master will send the latest status for each task currently known.

func NewPopulatedCall_Reconcile

func NewPopulatedCall_Reconcile(r randyScheduler, easy bool) *Call_Reconcile

func (*Call_Reconcile) Equal

func (this *Call_Reconcile) Equal(that interface{}) bool

func (*Call_Reconcile) GetTasks

func (m *Call_Reconcile) GetTasks() []*Call_Reconcile_Task

func (*Call_Reconcile) GoString

func (this *Call_Reconcile) GoString() string

func (*Call_Reconcile) Marshal

func (m *Call_Reconcile) Marshal() (data []byte, err error)

func (*Call_Reconcile) MarshalTo

func (m *Call_Reconcile) MarshalTo(data []byte) (int, error)

func (*Call_Reconcile) ProtoMessage

func (*Call_Reconcile) ProtoMessage()

func (*Call_Reconcile) Reset

func (m *Call_Reconcile) Reset()

func (*Call_Reconcile) Size

func (m *Call_Reconcile) Size() (n int)

func (*Call_Reconcile) String

func (this *Call_Reconcile) String() string

func (*Call_Reconcile) Unmarshal

func (m *Call_Reconcile) Unmarshal(data []byte) error

func (*Call_Reconcile) VerboseEqual

func (this *Call_Reconcile) VerboseEqual(that interface{}) error

type Call_Reconcile_Task

type Call_Reconcile_Task struct {
	TaskId           *mesosproto.TaskID  `protobuf:"bytes,1,req,name=task_id" json:"task_id,omitempty"`
	SlaveId          *mesosproto.SlaveID `protobuf:"bytes,2,opt,name=slave_id" json:"slave_id,omitempty"`
	XXX_unrecognized []byte              `json:"-"`
}

TODO(vinod): Support arbitrary queries than just state of tasks.

func NewPopulatedCall_Reconcile_Task

func NewPopulatedCall_Reconcile_Task(r randyScheduler, easy bool) *Call_Reconcile_Task

func (*Call_Reconcile_Task) Equal

func (this *Call_Reconcile_Task) Equal(that interface{}) bool

func (*Call_Reconcile_Task) GetSlaveId

func (m *Call_Reconcile_Task) GetSlaveId() *mesosproto.SlaveID

func (*Call_Reconcile_Task) GetTaskId

func (m *Call_Reconcile_Task) GetTaskId() *mesosproto.TaskID

func (*Call_Reconcile_Task) GoString

func (this *Call_Reconcile_Task) GoString() string

func (*Call_Reconcile_Task) Marshal

func (m *Call_Reconcile_Task) Marshal() (data []byte, err error)

func (*Call_Reconcile_Task) MarshalTo

func (m *Call_Reconcile_Task) MarshalTo(data []byte) (int, error)

func (*Call_Reconcile_Task) ProtoMessage

func (*Call_Reconcile_Task) ProtoMessage()

func (*Call_Reconcile_Task) Reset

func (m *Call_Reconcile_Task) Reset()

func (*Call_Reconcile_Task) Size

func (m *Call_Reconcile_Task) Size() (n int)

func (*Call_Reconcile_Task) String

func (this *Call_Reconcile_Task) String() string

func (*Call_Reconcile_Task) Unmarshal

func (m *Call_Reconcile_Task) Unmarshal(data []byte) error

func (*Call_Reconcile_Task) VerboseEqual

func (this *Call_Reconcile_Task) VerboseEqual(that interface{}) error

type Call_Request

type Call_Request struct {
	Requests         []*mesosproto.Request `protobuf:"bytes,1,rep,name=requests" json:"requests,omitempty"`
	XXX_unrecognized []byte                `json:"-"`
}

Requests a specific set of resources from Mesos's allocator. If the allocator has support for this, corresponding offers will be sent asynchronously via the OFFERS event(s).

NOTE: The built-in hierarchical allocator doesn't have support for this call and hence simply ignores it.

func NewPopulatedCall_Request

func NewPopulatedCall_Request(r randyScheduler, easy bool) *Call_Request

func (*Call_Request) Equal

func (this *Call_Request) Equal(that interface{}) bool

func (*Call_Request) GetRequests

func (m *Call_Request) GetRequests() []*mesosproto.Request

func (*Call_Request) GoString

func (this *Call_Request) GoString() string

func (*Call_Request) Marshal

func (m *Call_Request) Marshal() (data []byte, err error)

func (*Call_Request) MarshalTo

func (m *Call_Request) MarshalTo(data []byte) (int, error)

func (*Call_Request) ProtoMessage

func (*Call_Request) ProtoMessage()

func (*Call_Request) Reset

func (m *Call_Request) Reset()

func (*Call_Request) Size

func (m *Call_Request) Size() (n int)

func (*Call_Request) String

func (this *Call_Request) String() string

func (*Call_Request) Unmarshal

func (m *Call_Request) Unmarshal(data []byte) error

func (*Call_Request) VerboseEqual

func (this *Call_Request) VerboseEqual(that interface{}) error

type Call_Shutdown

type Call_Shutdown struct {
	ExecutorId       *mesosproto.ExecutorID `protobuf:"bytes,1,req,name=executor_id" json:"executor_id,omitempty"`
	SlaveId          *mesosproto.SlaveID    `protobuf:"bytes,2,req,name=slave_id" json:"slave_id,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

Shuts down a custom executor. When the executor gets a shutdown event, it is expected to kill all its tasks (and send TASK_KILLED updates) and terminate. If the executor doesn’t terminate within a certain timeout (configurable via '--executor_shutdown_grace_period' slave flag), the slave will forcefully destroy the container (executor and its tasks) and transition its active tasks to TASK_LOST.

func NewPopulatedCall_Shutdown

func NewPopulatedCall_Shutdown(r randyScheduler, easy bool) *Call_Shutdown

func (*Call_Shutdown) Equal

func (this *Call_Shutdown) Equal(that interface{}) bool

func (*Call_Shutdown) GetExecutorId

func (m *Call_Shutdown) GetExecutorId() *mesosproto.ExecutorID

func (*Call_Shutdown) GetSlaveId

func (m *Call_Shutdown) GetSlaveId() *mesosproto.SlaveID

func (*Call_Shutdown) GoString

func (this *Call_Shutdown) GoString() string

func (*Call_Shutdown) Marshal

func (m *Call_Shutdown) Marshal() (data []byte, err error)

func (*Call_Shutdown) MarshalTo

func (m *Call_Shutdown) MarshalTo(data []byte) (int, error)

func (*Call_Shutdown) ProtoMessage

func (*Call_Shutdown) ProtoMessage()

func (*Call_Shutdown) Reset

func (m *Call_Shutdown) Reset()

func (*Call_Shutdown) Size

func (m *Call_Shutdown) Size() (n int)

func (*Call_Shutdown) String

func (this *Call_Shutdown) String() string

func (*Call_Shutdown) Unmarshal

func (m *Call_Shutdown) Unmarshal(data []byte) error

func (*Call_Shutdown) VerboseEqual

func (this *Call_Shutdown) VerboseEqual(that interface{}) error

type Call_Subscribe

type Call_Subscribe struct {
	// See the comments below on 'framework_id' on the semantics for
	// 'framework_info.id'.
	FrameworkInfo *mesosproto.FrameworkInfo `protobuf:"bytes,1,req,name=framework_info" json:"framework_info,omitempty"`
	// 'force' field is only relevant when 'framework_info.id' is set.
	// It tells the master what to do in case an instance of the
	// scheduler attempts to subscribe when another instance of it is
	// already connected (e.g., split brain due to network partition).
	// If 'force' is true, this scheduler instance is allowed and the
	// old connected scheduler instance is disconnected. If false,
	// this scheduler instance is disallowed subscription in favor of
	// the already connected scheduler instance.
	//
	// It is recommended to set this to true only when a newly elected
	// scheduler instance is attempting to subscribe but not when a
	// scheduler is retrying subscription (e.g., disconnection or
	// master failover; see sched/sched.cpp for an example).
	Force            *bool  `protobuf:"varint,2,opt,name=force" json:"force,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

Subscribes the scheduler with the master to receive events. A scheduler must send other calls only after it has received the SUBCRIBED event.

func NewPopulatedCall_Subscribe

func NewPopulatedCall_Subscribe(r randyScheduler, easy bool) *Call_Subscribe

func (*Call_Subscribe) Equal

func (this *Call_Subscribe) Equal(that interface{}) bool

func (*Call_Subscribe) GetForce

func (m *Call_Subscribe) GetForce() bool

func (*Call_Subscribe) GetFrameworkInfo

func (m *Call_Subscribe) GetFrameworkInfo() *mesosproto.FrameworkInfo

func (*Call_Subscribe) GoString

func (this *Call_Subscribe) GoString() string

func (*Call_Subscribe) Marshal

func (m *Call_Subscribe) Marshal() (data []byte, err error)

func (*Call_Subscribe) MarshalTo

func (m *Call_Subscribe) MarshalTo(data []byte) (int, error)

func (*Call_Subscribe) ProtoMessage

func (*Call_Subscribe) ProtoMessage()

func (*Call_Subscribe) Reset

func (m *Call_Subscribe) Reset()

func (*Call_Subscribe) Size

func (m *Call_Subscribe) Size() (n int)

func (*Call_Subscribe) String

func (this *Call_Subscribe) String() string

func (*Call_Subscribe) Unmarshal

func (m *Call_Subscribe) Unmarshal(data []byte) error

func (*Call_Subscribe) VerboseEqual

func (this *Call_Subscribe) VerboseEqual(that interface{}) error

type Call_Type

type Call_Type int32

Possible call types, followed by message definitions if applicable.

const (
	Call_SUBSCRIBE   Call_Type = 1
	Call_TEARDOWN    Call_Type = 2
	Call_ACCEPT      Call_Type = 3
	Call_DECLINE     Call_Type = 4
	Call_REVIVE      Call_Type = 5
	Call_KILL        Call_Type = 6
	Call_SHUTDOWN    Call_Type = 7
	Call_ACKNOWLEDGE Call_Type = 8
	Call_RECONCILE   Call_Type = 9
	Call_MESSAGE     Call_Type = 10
	Call_REQUEST     Call_Type = 11
	Call_SUPPRESS    Call_Type = 12
)

func (Call_Type) Enum

func (x Call_Type) Enum() *Call_Type

func (Call_Type) String

func (x Call_Type) String() string

func (*Call_Type) UnmarshalJSON

func (x *Call_Type) UnmarshalJSON(data []byte) error

type Event

type Event struct {
	// Type of the event, indicates which optional field below should be
	// present if that type has a nested message definition.
	Type             *Event_Type       `protobuf:"varint,1,req,name=type,enum=mesosproto.scheduler.Event_Type" json:"type,omitempty"`
	Subscribed       *Event_Subscribed `protobuf:"bytes,2,opt,name=subscribed" json:"subscribed,omitempty"`
	Offers           *Event_Offers     `protobuf:"bytes,3,opt,name=offers" json:"offers,omitempty"`
	Rescind          *Event_Rescind    `protobuf:"bytes,4,opt,name=rescind" json:"rescind,omitempty"`
	Update           *Event_Update     `protobuf:"bytes,5,opt,name=update" json:"update,omitempty"`
	Message          *Event_Message    `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
	Failure          *Event_Failure    `protobuf:"bytes,7,opt,name=failure" json:"failure,omitempty"`
	Error            *Event_Error      `protobuf:"bytes,8,opt,name=error" json:"error,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

* Scheduler event API.

An event is described using the standard protocol buffer "union" trick, see: https://developers.google.com/protocol-buffers/docs/techniques#union.

func NewPopulatedEvent

func NewPopulatedEvent(r randyScheduler, easy bool) *Event

func (*Event) Equal

func (this *Event) Equal(that interface{}) bool

func (*Event) GetError

func (m *Event) GetError() *Event_Error

func (*Event) GetFailure

func (m *Event) GetFailure() *Event_Failure

func (*Event) GetMessage

func (m *Event) GetMessage() *Event_Message

func (*Event) GetOffers

func (m *Event) GetOffers() *Event_Offers

func (*Event) GetRescind

func (m *Event) GetRescind() *Event_Rescind

func (*Event) GetSubscribed

func (m *Event) GetSubscribed() *Event_Subscribed

func (*Event) GetType

func (m *Event) GetType() Event_Type

func (*Event) GetUpdate

func (m *Event) GetUpdate() *Event_Update

func (*Event) GoString

func (this *Event) GoString() string

func (*Event) Marshal

func (m *Event) Marshal() (data []byte, err error)

func (*Event) MarshalTo

func (m *Event) MarshalTo(data []byte) (int, error)

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) Size

func (m *Event) Size() (n int)

func (*Event) String

func (this *Event) String() string

func (*Event) Unmarshal

func (m *Event) Unmarshal(data []byte) error

func (*Event) VerboseEqual

func (this *Event) VerboseEqual(that interface{}) error

type Event_Error

type Event_Error struct {
	Message          *string `protobuf:"bytes,1,req,name=message" json:"message,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

Received when an invalid framework (e.g., unauthenticated, unauthorized) attempts to subscribe with the master. Error can also be received if scheduler sends invalid Calls (e.g., not properly initialized). TODO(vinod): Remove this once the old scheduler driver is no longer supported. With HTTP API all errors will be signaled via HTTP response codes.

func NewPopulatedEvent_Error

func NewPopulatedEvent_Error(r randyScheduler, easy bool) *Event_Error

func (*Event_Error) Equal

func (this *Event_Error) Equal(that interface{}) bool

func (*Event_Error) GetMessage

func (m *Event_Error) GetMessage() string

func (*Event_Error) GoString

func (this *Event_Error) GoString() string

func (*Event_Error) Marshal

func (m *Event_Error) Marshal() (data []byte, err error)

func (*Event_Error) MarshalTo

func (m *Event_Error) MarshalTo(data []byte) (int, error)

func (*Event_Error) ProtoMessage

func (*Event_Error) ProtoMessage()

func (*Event_Error) Reset

func (m *Event_Error) Reset()

func (*Event_Error) Size

func (m *Event_Error) Size() (n int)

func (*Event_Error) String

func (this *Event_Error) String() string

func (*Event_Error) Unmarshal

func (m *Event_Error) Unmarshal(data []byte) error

func (*Event_Error) VerboseEqual

func (this *Event_Error) VerboseEqual(that interface{}) error

type Event_Failure

type Event_Failure struct {
	SlaveId *mesosproto.SlaveID `protobuf:"bytes,1,opt,name=slave_id" json:"slave_id,omitempty"`
	// If this was just a failure of an executor on a slave then
	// 'executor_id' will be set and possibly 'status' (if we were
	// able to determine the exit status).
	ExecutorId       *mesosproto.ExecutorID `protobuf:"bytes,2,opt,name=executor_id" json:"executor_id,omitempty"`
	Status           *int32                 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

Received when a slave is removed from the cluster (e.g., failed health checks) or when an executor is terminated. Note that, this event coincides with receipt of terminal UPDATE events for any active tasks belonging to the slave or executor and receipt of 'Rescind' events for any outstanding offers belonging to the slave. Note that there is no guaranteed order between the 'Failure', 'Update' and 'Rescind' events when a slave or executor is removed. TODO(vinod): Consider splitting the lost slave and terminated executor into separate events and ensure it's reliably generated.

func NewPopulatedEvent_Failure

func NewPopulatedEvent_Failure(r randyScheduler, easy bool) *Event_Failure

func (*Event_Failure) Equal

func (this *Event_Failure) Equal(that interface{}) bool

func (*Event_Failure) GetExecutorId

func (m *Event_Failure) GetExecutorId() *mesosproto.ExecutorID

func (*Event_Failure) GetSlaveId

func (m *Event_Failure) GetSlaveId() *mesosproto.SlaveID

func (*Event_Failure) GetStatus

func (m *Event_Failure) GetStatus() int32

func (*Event_Failure) GoString

func (this *Event_Failure) GoString() string

func (*Event_Failure) Marshal

func (m *Event_Failure) Marshal() (data []byte, err error)

func (*Event_Failure) MarshalTo

func (m *Event_Failure) MarshalTo(data []byte) (int, error)

func (*Event_Failure) ProtoMessage

func (*Event_Failure) ProtoMessage()

func (*Event_Failure) Reset

func (m *Event_Failure) Reset()

func (*Event_Failure) Size

func (m *Event_Failure) Size() (n int)

func (*Event_Failure) String

func (this *Event_Failure) String() string

func (*Event_Failure) Unmarshal

func (m *Event_Failure) Unmarshal(data []byte) error

func (*Event_Failure) VerboseEqual

func (this *Event_Failure) VerboseEqual(that interface{}) error

type Event_Message

type Event_Message struct {
	SlaveId          *mesosproto.SlaveID    `protobuf:"bytes,1,req,name=slave_id" json:"slave_id,omitempty"`
	ExecutorId       *mesosproto.ExecutorID `protobuf:"bytes,2,req,name=executor_id" json:"executor_id,omitempty"`
	Data             []byte                 `protobuf:"bytes,3,req,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

Received when a custom message generated by the executor is forwarded by the master. Note that this message is not interpreted by Mesos and is only forwarded (without reliability guarantees) to the scheduler. It is up to the executor to retry if the message is dropped for any reason.

func NewPopulatedEvent_Message

func NewPopulatedEvent_Message(r randyScheduler, easy bool) *Event_Message

func (*Event_Message) Equal

func (this *Event_Message) Equal(that interface{}) bool

func (*Event_Message) GetData

func (m *Event_Message) GetData() []byte

func (*Event_Message) GetExecutorId

func (m *Event_Message) GetExecutorId() *mesosproto.ExecutorID

func (*Event_Message) GetSlaveId

func (m *Event_Message) GetSlaveId() *mesosproto.SlaveID

func (*Event_Message) GoString

func (this *Event_Message) GoString() string

func (*Event_Message) Marshal

func (m *Event_Message) Marshal() (data []byte, err error)

func (*Event_Message) MarshalTo

func (m *Event_Message) MarshalTo(data []byte) (int, error)

func (*Event_Message) ProtoMessage

func (*Event_Message) ProtoMessage()

func (*Event_Message) Reset

func (m *Event_Message) Reset()

func (*Event_Message) Size

func (m *Event_Message) Size() (n int)

func (*Event_Message) String

func (this *Event_Message) String() string

func (*Event_Message) Unmarshal

func (m *Event_Message) Unmarshal(data []byte) error

func (*Event_Message) VerboseEqual

func (this *Event_Message) VerboseEqual(that interface{}) error

type Event_Offers

type Event_Offers struct {
	Offers           []*mesosproto.Offer        `protobuf:"bytes,1,rep,name=offers" json:"offers,omitempty"`
	InverseOffers    []*mesosproto.InverseOffer `protobuf:"bytes,2,rep,name=inverse_offers" json:"inverse_offers,omitempty"`
	XXX_unrecognized []byte                     `json:"-"`
}

Received whenever there are new resources that are offered to the scheduler or resources requested back from the scheduler. Each offer corresponds to a set of resources on a slave. Until the scheduler accepts or declines an offer the resources are considered allocated to the scheduler. Accepting or Declining an inverse offer informs the allocator of the scheduler's ability to release the resources without violating an SLA.

func NewPopulatedEvent_Offers

func NewPopulatedEvent_Offers(r randyScheduler, easy bool) *Event_Offers

func (*Event_Offers) Equal

func (this *Event_Offers) Equal(that interface{}) bool

func (*Event_Offers) GetInverseOffers

func (m *Event_Offers) GetInverseOffers() []*mesosproto.InverseOffer

func (*Event_Offers) GetOffers

func (m *Event_Offers) GetOffers() []*mesosproto.Offer

func (*Event_Offers) GoString

func (this *Event_Offers) GoString() string

func (*Event_Offers) Marshal

func (m *Event_Offers) Marshal() (data []byte, err error)

func (*Event_Offers) MarshalTo

func (m *Event_Offers) MarshalTo(data []byte) (int, error)

func (*Event_Offers) ProtoMessage

func (*Event_Offers) ProtoMessage()

func (*Event_Offers) Reset

func (m *Event_Offers) Reset()

func (*Event_Offers) Size

func (m *Event_Offers) Size() (n int)

func (*Event_Offers) String

func (this *Event_Offers) String() string

func (*Event_Offers) Unmarshal

func (m *Event_Offers) Unmarshal(data []byte) error

func (*Event_Offers) VerboseEqual

func (this *Event_Offers) VerboseEqual(that interface{}) error

type Event_Rescind

type Event_Rescind struct {
	OfferId          *mesosproto.OfferID `protobuf:"bytes,1,req,name=offer_id" json:"offer_id,omitempty"`
	XXX_unrecognized []byte              `json:"-"`
}

Received when a particular offer is no longer valid (e.g., the slave corresponding to the offer has been removed) and hence needs to be rescinded. Any future calls ('Accept' / 'Decline') made by the scheduler regarding this offer will be invalid.

func NewPopulatedEvent_Rescind

func NewPopulatedEvent_Rescind(r randyScheduler, easy bool) *Event_Rescind

func (*Event_Rescind) Equal

func (this *Event_Rescind) Equal(that interface{}) bool

func (*Event_Rescind) GetOfferId

func (m *Event_Rescind) GetOfferId() *mesosproto.OfferID

func (*Event_Rescind) GoString

func (this *Event_Rescind) GoString() string

func (*Event_Rescind) Marshal

func (m *Event_Rescind) Marshal() (data []byte, err error)

func (*Event_Rescind) MarshalTo

func (m *Event_Rescind) MarshalTo(data []byte) (int, error)

func (*Event_Rescind) ProtoMessage

func (*Event_Rescind) ProtoMessage()

func (*Event_Rescind) Reset

func (m *Event_Rescind) Reset()

func (*Event_Rescind) Size

func (m *Event_Rescind) Size() (n int)

func (*Event_Rescind) String

func (this *Event_Rescind) String() string

func (*Event_Rescind) Unmarshal

func (m *Event_Rescind) Unmarshal(data []byte) error

func (*Event_Rescind) VerboseEqual

func (this *Event_Rescind) VerboseEqual(that interface{}) error

type Event_Subscribed

type Event_Subscribed struct {
	FrameworkId *mesosproto.FrameworkID `protobuf:"bytes,1,req,name=framework_id" json:"framework_id,omitempty"`
	// This value will be set if the master is sending heartbeats. See
	// the comment above on 'HEARTBEAT' for more details.
	HeartbeatIntervalSeconds *float64 `protobuf:"fixed64,2,opt,name=heartbeat_interval_seconds" json:"heartbeat_interval_seconds,omitempty"`
	XXX_unrecognized         []byte   `json:"-"`
}

First event received when the scheduler subscribes.

func NewPopulatedEvent_Subscribed

func NewPopulatedEvent_Subscribed(r randyScheduler, easy bool) *Event_Subscribed

func (*Event_Subscribed) Equal

func (this *Event_Subscribed) Equal(that interface{}) bool

func (*Event_Subscribed) GetFrameworkId

func (m *Event_Subscribed) GetFrameworkId() *mesosproto.FrameworkID

func (*Event_Subscribed) GetHeartbeatIntervalSeconds

func (m *Event_Subscribed) GetHeartbeatIntervalSeconds() float64

func (*Event_Subscribed) GoString

func (this *Event_Subscribed) GoString() string

func (*Event_Subscribed) Marshal

func (m *Event_Subscribed) Marshal() (data []byte, err error)

func (*Event_Subscribed) MarshalTo

func (m *Event_Subscribed) MarshalTo(data []byte) (int, error)

func (*Event_Subscribed) ProtoMessage

func (*Event_Subscribed) ProtoMessage()

func (*Event_Subscribed) Reset

func (m *Event_Subscribed) Reset()

func (*Event_Subscribed) Size

func (m *Event_Subscribed) Size() (n int)

func (*Event_Subscribed) String

func (this *Event_Subscribed) String() string

func (*Event_Subscribed) Unmarshal

func (m *Event_Subscribed) Unmarshal(data []byte) error

func (*Event_Subscribed) VerboseEqual

func (this *Event_Subscribed) VerboseEqual(that interface{}) error

type Event_Type

type Event_Type int32

Possible event types, followed by message definitions if applicable.

const (
	Event_SUBSCRIBED Event_Type = 1
	Event_OFFERS     Event_Type = 2
	Event_RESCIND    Event_Type = 3
	Event_UPDATE     Event_Type = 4
	Event_MESSAGE    Event_Type = 5
	Event_FAILURE    Event_Type = 6
	Event_ERROR      Event_Type = 7
	// Periodic message sent by the Mesos master according to
	// 'Subscribed.heartbeat_interval_seconds'. If the scheduler does
	// not receive any events (including heartbeats) for an extended
	// period of time (e.g., 5 x heartbeat_interval_seconds), there is
	// likely a network partition. In such a case the scheduler should
	// close the existing subscription connection and resubscribe
	// using a backoff strategy.
	Event_HEARTBEAT Event_Type = 8
)

func (Event_Type) Enum

func (x Event_Type) Enum() *Event_Type

func (Event_Type) String

func (x Event_Type) String() string

func (*Event_Type) UnmarshalJSON

func (x *Event_Type) UnmarshalJSON(data []byte) error

type Event_Update

type Event_Update struct {
	Status           *mesosproto.TaskStatus `protobuf:"bytes,1,req,name=status" json:"status,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

Received whenever there is a status update that is generated by the executor or slave or master. Status updates should be used by executors to reliably communicate the status of the tasks that they manage. It is crucial that a terminal update (see TaskState in mesos.proto) is sent by the executor as soon as the task terminates, in order for Mesos to release the resources allocated to the task. It is also the responsibility of the scheduler to explicitly acknowledge the receipt of a status update. See 'Acknowledge' in the 'Call' section below for the semantics.

func NewPopulatedEvent_Update

func NewPopulatedEvent_Update(r randyScheduler, easy bool) *Event_Update

func (*Event_Update) Equal

func (this *Event_Update) Equal(that interface{}) bool

func (*Event_Update) GetStatus

func (m *Event_Update) GetStatus() *mesosproto.TaskStatus

func (*Event_Update) GoString

func (this *Event_Update) GoString() string

func (*Event_Update) Marshal

func (m *Event_Update) Marshal() (data []byte, err error)

func (*Event_Update) MarshalTo

func (m *Event_Update) MarshalTo(data []byte) (int, error)

func (*Event_Update) ProtoMessage

func (*Event_Update) ProtoMessage()

func (*Event_Update) Reset

func (m *Event_Update) Reset()

func (*Event_Update) Size

func (m *Event_Update) Size() (n int)

func (*Event_Update) String

func (this *Event_Update) String() string

func (*Event_Update) Unmarshal

func (m *Event_Update) Unmarshal(data []byte) error

func (*Event_Update) VerboseEqual

func (this *Event_Update) VerboseEqual(that interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL