jobmgr

package
v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// HTTP port which JobMgr is listening on
	HTTPPort int `yaml:"http_port"`

	// gRPC port which JobMgr is listening on
	GRPCPort int `yaml:"grpc_port"`

	// FIXME(gabe): this isnt really the DB write concurrency. This is
	// only used for processing task updates and should be moved into
	// the storage namespace, and made clearer what this controls
	// (threads? rows? statements?)
	DbWriteConcurrency int `yaml:"db_write_concurrency"`

	// Task launcher specific configs
	Placement placement.Config `yaml:"task_launcher"`

	// GoalState configuration
	GoalState goalstate.Config `yaml:"goal_state"`

	// Eviction related config
	Evictor evictor.Config `yaml:"task_evictor"`

	Deadline deadline.Config `yaml:"deadline"`

	// Job service specific configuration
	JobSvcCfg jobsvc.Config `yaml:"job_service"`

	// Watch API specific configuration
	Watch watchsvc.Config `yaml:"watch"`

	// WorkflowProgressCheck specific configuration
	WorkflowProgressCheck progress.Config `yaml:"workflow_progress_check"`

	// Period in sec for updating active cache
	ActiveTaskUpdatePeriod time.Duration `yaml:"active_task_update_period"`

	// HostManagerAPIVersion is the API version that the Resource Manager
	// should use to talk to Host Manager.
	HostManagerAPIVersion api.Version `yaml:"hostmgr_api_version"`

	// ThemrosExecutor is config used to generate mesos CommandInfo / ExecutorInfo
	// for Thermos executor
	ThermosExecutor config.ThermosExecutorConfig `yaml:"thermos_executor"`
}

Config is JobManager specific configuration

type Server

type Server struct {
	sync.Mutex

	ID string
	// contains filtered or unexported fields
}

Server contains all structs necessary to run a jobmgr server. This struct also implements leader.Node interface so that it can perform leader election among multiple job manager server instances.

func NewServer

func NewServer(
	httpPort, grpcPort int,
	jobFactory cached.JobFactory,
	goalstateDriver goalstate.Driver,
	taskPreemptor evictor.Evictor,
	deadlineTracker deadline.Tracker,
	placementProcessor placement.Processor,
	statusUpdate event.StatusUpdate,
	backgroundManager background.Manager,
	watchProcessor watchsvc.WatchProcessor,
) *Server

NewServer creates a job manager Server instance.

func (*Server) GainedLeadershipCallback

func (s *Server) GainedLeadershipCallback() error

GainedLeadershipCallback is the callback when the current node becomes the leader

func (*Server) GetID

func (s *Server) GetID() string

GetID function returns jobmgr app address. This implements leader.Nomination.

func (*Server) HasGainedLeadership

func (s *Server) HasGainedLeadership() bool

HasGainedLeadership returns true iff once GainedLeadershipCallback completes

func (*Server) LostLeadershipCallback

func (s *Server) LostLeadershipCallback() error

LostLeadershipCallback is the callback when the current node lost leadership

func (*Server) ShutDownCallback

func (s *Server) ShutDownCallback() error

ShutDownCallback is the callback to shut down gracefully if possible

Directories

Path Synopsis
Package common provides common structure/interface/errors used throughout jobmgr.
Package common provides common structure/interface/errors used throughout jobmgr.
job
util
job
workflow

Jump to

Keyboard shortcuts

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