worker

package
v0.0.0-...-4dc66ed Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WorkerActorKind is actor kind of worker
	WorkerActorKind = "worker"

	// CoordinatorActorID is actor id of coordinator
	CoordinatorActorID = "coordinator"

	// VertexStatsName is aggregator name of VertexStatsAggregator
	VertexStatsName = "prerogel/vertex-stats"
)
View Source
const (
	// CoordinatorStateInit describes state: on initializing
	CoordinatorStateInit = "initializing cluster"
	// CoordinatorStateIdle describes state: idle
	CoordinatorStateIdle = "idle"
	// CoordinatorStateLoadingVertices describes state: loading vertices
	CoordinatorStateLoadingVertices = "loading vertices of each partition"
	// CoordinatorStateProcessing describes state: processing superstep
	CoordinatorStateProcessing = "processing superstep"
	// CoordinatorStateProcessingComputing describes state: computing
	CoordinatorStateProcessingComputing = "processing superstep - computing"
)
View Source
const (
	// APIPathStats is path for stats
	APIPathStats = "/ctl/stats"
	// APIPathLoadVertex is path for loading vertex
	APIPathLoadVertex = "/ctl/load-vertex"
	// APIPathLoadPartitionVertices is path for loading vertices of each partition
	APIPathLoadPartitionVertices = "/ctl/load-partition"
	// APIPathStartSuperStep is path for starting super step
	APIPathStartSuperStep = "/ctl/start-superstep"
	// APIPathShowAggregatedValue is path for showing aggregator values
	APIPathShowAggregatedValue = "/ctl/agg"
	// APIPathShutdown is path for shutdown
	APIPathShutdown = "/ctl/shutdown"
	// APIPathGetVertexValue is path for getting vertex valu
	APIPathGetVertexValue = "/ctl/vertex/value"
)

Variables

This section is empty.

Functions

func NewCoordinatorActor

func NewCoordinatorActor(plg plugin.Plugin, workerProps *actor.Props, shutdown func(), logger *logrus.Logger) actor.Actor

NewCoordinatorActor returns an actor instance

func NewPartitionActor

func NewPartitionActor(plg plugin.Plugin, vertexProps *actor.Props, logger *logrus.Logger) actor.Actor

NewPartitionActor returns an actor instance

func NewVertexActor

func NewVertexActor(plugin plugin.Plugin, logger *logrus.Logger) actor.Actor

NewVertexActor returns an actor instance

func NewWorkerActor

func NewWorkerActor(plugin plugin.Plugin, partitionProps *actor.Props, shutdown func(), logger *logrus.Logger) actor.Actor

NewWorkerActor returns a new actor instance

func Run

func Run(ctx context.Context, plg plugin.Plugin, envPrefix string) error

Run starts worker server

func RunMaster

func RunMaster(ctx context.Context, plg plugin.Plugin, conf *config.MasterEnv) error

RunMaster starts running as master worker

func RunWorker

func RunWorker(ctx context.Context, plg plugin.Plugin, conf *config.WorkerEnv) error

RunWorker starts running as normal worker

Types

type CtrlServer

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

CtrlServer is server that provides management API

type ErrRes

type ErrRes struct {
	Message string `json:"message"`
}

ErrRes is error response

Jump to

Keyboard shortcuts

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