scheduler

package
v0.0.0-...-3cc9250 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Schedule tasks to run on available resources assigned by master.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assign

func Assign(master string, request *pb.ComputeRequest) (*pb.AllocationResult, error)

Types

type DatasetShardLocator

type DatasetShardLocator struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewDatasetShardLocator

func NewDatasetShardLocator() *DatasetShardLocator

func (*DatasetShardLocator) GetShardLocation

func (l *DatasetShardLocator) GetShardLocation(shardName string) (pb.DataLocation, bool)

func (*DatasetShardLocator) SetShardLocation

func (l *DatasetShardLocator) SetShardLocation(name string, location pb.DataLocation)

type RemoteExecutorStatus

type RemoteExecutorStatus struct {
	Request      *pb.ExecutionRequest
	Allocation   *pb.Allocation
	RequestTime  time.Time
	InputLength  int
	OutputLength int
	ReadyTime    time.Time
	RunTime      time.Time
	StopTime     time.Time
}

type Scheduler

type Scheduler struct {
	sync.Mutex

	Master    string
	EventChan chan interface{}
	Market    *market.Market
	Option    *SchedulerOption
	// contains filtered or unexported fields
}

func NewScheduler

func NewScheduler(leader string, option *SchedulerOption) *Scheduler

func (*Scheduler) DeleteOutout

func (s *Scheduler) DeleteOutout(taskGroup *plan.TaskGroup)

func (*Scheduler) ExecuteTaskGroup

func (s *Scheduler) ExecuteTaskGroup(ctx context.Context,
	fc *flow.FlowContext,
	statusTaskGroup *pb.FlowExecutionStatus_TaskGroup,
	wg *sync.WaitGroup,
	taskGroup *plan.TaskGroup, bid float64)

ExecuteTaskGroup wait for inputs and execute the task group remotely. If cancelled, the output will be cleaned up.

func (*Scheduler) Fetch

func (s *Scheduler) Fetch(demands []market.Demand)

Requirement is TaskGroup Object is Agent's Location

func (*Scheduler) Score

func (s *Scheduler) Score(r market.Requirement, bid float64, obj market.Object) float64

type SchedulerOption

type SchedulerOption struct {
	DataCenter   string
	Rack         string
	TaskMemoryMB int
	DriverHost   string
	DriverPort   int
	Module       string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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