mesoslib

package
v0.0.0-...-705e2cb Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

README

This directory wrapps the mesos client library, should be usefull once we need to upgrade to the latest mesos-go implementation

Documentation

Index

Constants

View Source
const FailoverTime = 60 * 60 * 24 * 7

FailoverTime Frameowkr and its task will be terminated if the framework is not available for 1 week

View Source
const TimeFormat = "2006-01-02 15:04:05.999999999 -0700 MST"

TimeFormat we need to parse the Timestamp

Variables

This section is empty.

Functions

func GetFrameWorkID

func GetFrameWorkID() (string, float64)

GetFrameWorkID If the framework was regiestered before the Failover timeout value then regiester as a new framework

func Run

func Run(MasterEndPoint, ServerIP, ServerPort, executorPath, redisImage, DbType, DbEndPoint, FrameworkName, UserName string)

Run primary function that starts the Mesos Scheduler

Types

type MrRedisScheduler

type MrRedisScheduler struct {
	// contains filtered or unexported fields
}

MrRedisScheduler scheudler struct

func NewMrRedisScheduler

func NewMrRedisScheduler(exec *mesos.ExecutorInfo) *MrRedisScheduler

NewMrRedisScheduler Constructor

func (*MrRedisScheduler) Disconnected

func (S *MrRedisScheduler) Disconnected(sched.SchedulerDriver)

Disconnected Not implemented call back

func (*MrRedisScheduler) Error

func (S *MrRedisScheduler) Error(_ sched.SchedulerDriver, err string)

Error Not implemeted

func (*MrRedisScheduler) ExecutorLost

func (S *MrRedisScheduler) ExecutorLost(_ sched.SchedulerDriver, eid *mesos.ExecutorID, sid *mesos.SlaveID, code int)

ExecutorLost Not implemented

func (*MrRedisScheduler) FrameworkMessage

func (S *MrRedisScheduler) FrameworkMessage(_ sched.SchedulerDriver, eid *mesos.ExecutorID, sid *mesos.SlaveID, msg string)

FrameworkMessage not implemented

func (*MrRedisScheduler) OfferRescinded

func (S *MrRedisScheduler) OfferRescinded(_ sched.SchedulerDriver, oid *mesos.OfferID)

OfferRescinded Not implemented

func (*MrRedisScheduler) Registered

func (S *MrRedisScheduler) Registered(driver sched.SchedulerDriver, frameworkID *mesos.FrameworkID, masterInfo *mesos.MasterInfo)

Registered Scheduler register call back initializes the timestamp and framework id

func (*MrRedisScheduler) Reregistered

func (S *MrRedisScheduler) Reregistered(driver sched.SchedulerDriver, masterInfo *mesos.MasterInfo)

Reregistered re-register call back simply updates the timestamp

func (*MrRedisScheduler) ResourceOffers

func (S *MrRedisScheduler) ResourceOffers(driver sched.SchedulerDriver, offers []*mesos.Offer)

ResourceOffers The moment we recive some offers we loop through the OfferList (container/list) see if we have any task that will fit this offers being sent

func (*MrRedisScheduler) SlaveLost

func (S *MrRedisScheduler) SlaveLost(_ sched.SchedulerDriver, sid *mesos.SlaveID)

SlaveLost Not implemented

func (*MrRedisScheduler) StatusUpdate

func (S *MrRedisScheduler) StatusUpdate(driver sched.SchedulerDriver, status *mesos.TaskStatus)

StatusUpdate Simply recives the update and passes it to the Maintainer goroutine

Jump to

Keyboard shortcuts

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