proto

package
v0.0.0-...-8b501b0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Step_Type_name = map[int32]string{
	0: "INVALID",
	1: "PRE",
	2: "POST",
	3: "POST_KEEP_RUNNING",
	4: "EXECUTED_GRAPH",
	5: "PESISTED_RESULTS",
	6: "COMPLETED_JOB",
}
View Source
var Step_Type_value = map[string]int32{
	"INVALID":           0,
	"PRE":               1,
	"POST":              2,
	"POST_KEEP_RUNNING": 3,
	"EXECUTED_GRAPH":    4,
	"PESISTED_RESULTS":  5,
	"COMPLETED_JOB":     6,
}

Functions

func RegisterJobQueueServer

func RegisterJobQueueServer(s *grpc.Server, srv JobQueueServer)

Types

type JobDetails

type JobDetails struct {
	// A unique ID for the job.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// The creation time for the job.
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// The [from, to) UUID range assigned to the worker. Note that from is
	// inclusive and to is exclusive.
	PartitionFromUuid    []byte   `protobuf:"bytes,3,opt,name=partition_from_uuid,json=partitionFromUuid,proto3" json:"partition_from_uuid,omitempty"`
	PartitionToUuid      []byte   `protobuf:"bytes,4,opt,name=partition_to_uuid,json=partitionToUuid,proto3" json:"partition_to_uuid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

JobDetails describes a job assigned by a master node to a worker.

func (*JobDetails) Descriptor

func (*JobDetails) Descriptor() ([]byte, []int)

func (*JobDetails) GetCreatedAt

func (m *JobDetails) GetCreatedAt() *timestamp.Timestamp

func (*JobDetails) GetJobId

func (m *JobDetails) GetJobId() string

func (*JobDetails) GetPartitionFromUuid

func (m *JobDetails) GetPartitionFromUuid() []byte

func (*JobDetails) GetPartitionToUuid

func (m *JobDetails) GetPartitionToUuid() []byte

func (*JobDetails) ProtoMessage

func (*JobDetails) ProtoMessage()

func (*JobDetails) Reset

func (m *JobDetails) Reset()

func (*JobDetails) String

func (m *JobDetails) String() string

func (*JobDetails) XXX_DiscardUnknown

func (m *JobDetails) XXX_DiscardUnknown()

func (*JobDetails) XXX_Marshal

func (m *JobDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobDetails) XXX_Merge

func (m *JobDetails) XXX_Merge(src proto.Message)

func (*JobDetails) XXX_Size

func (m *JobDetails) XXX_Size() int

func (*JobDetails) XXX_Unmarshal

func (m *JobDetails) XXX_Unmarshal(b []byte) error

type JobQueueClient

type JobQueueClient interface {
	// JobStream establishes a bi-directional connection between a worker and a
	// master. The master eventually broadcasts a new job to the connected
	// workers and the job super-steps are executed in lock-step across all
	// workers.
	JobStream(ctx context.Context, opts ...grpc.CallOption) (JobQueue_JobStreamClient, error)
}

JobQueueClient is the client API for JobQueue service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewJobQueueClient

func NewJobQueueClient(cc *grpc.ClientConn) JobQueueClient

type JobQueueServer

type JobQueueServer interface {
	// JobStream establishes a bi-directional connection between a worker and a
	// master. The master eventually broadcasts a new job to the connected
	// workers and the job super-steps are executed in lock-step across all
	// workers.
	JobStream(JobQueue_JobStreamServer) error
}

JobQueueServer is the server API for JobQueue service.

type JobQueue_JobStreamClient

type JobQueue_JobStreamClient interface {
	Send(*WorkerPayload) error
	Recv() (*MasterPayload, error)
	grpc.ClientStream
}

type JobQueue_JobStreamServer

type JobQueue_JobStreamServer interface {
	Send(*MasterPayload) error
	Recv() (*WorkerPayload, error)
	grpc.ServerStream
}

type MasterPayload

type MasterPayload struct {
	// Types that are valid to be assigned to Payload:
	//	*MasterPayload_JobDetails
	//	*MasterPayload_Step
	//	*MasterPayload_RelayMessage
	Payload              isMasterPayload_Payload `protobuf_oneof:"payload"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

MasterPayload encapsulates the possible message types that a master can send to a worker node.

func (*MasterPayload) Descriptor

func (*MasterPayload) Descriptor() ([]byte, []int)

func (*MasterPayload) GetJobDetails

func (m *MasterPayload) GetJobDetails() *JobDetails

func (*MasterPayload) GetPayload

func (m *MasterPayload) GetPayload() isMasterPayload_Payload

func (*MasterPayload) GetRelayMessage

func (m *MasterPayload) GetRelayMessage() *RelayMessage

func (*MasterPayload) GetStep

func (m *MasterPayload) GetStep() *Step

func (*MasterPayload) ProtoMessage

func (*MasterPayload) ProtoMessage()

func (*MasterPayload) Reset

func (m *MasterPayload) Reset()

func (*MasterPayload) String

func (m *MasterPayload) String() string

func (*MasterPayload) XXX_DiscardUnknown

func (m *MasterPayload) XXX_DiscardUnknown()

func (*MasterPayload) XXX_Marshal

func (m *MasterPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MasterPayload) XXX_Merge

func (m *MasterPayload) XXX_Merge(src proto.Message)

func (*MasterPayload) XXX_OneofWrappers

func (*MasterPayload) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*MasterPayload) XXX_Size

func (m *MasterPayload) XXX_Size() int

func (*MasterPayload) XXX_Unmarshal

func (m *MasterPayload) XXX_Unmarshal(b []byte) error

type MasterPayload_JobDetails

type MasterPayload_JobDetails struct {
	JobDetails *JobDetails `protobuf:"bytes,1,opt,name=job_details,json=jobDetails,proto3,oneof"`
}

type MasterPayload_RelayMessage

type MasterPayload_RelayMessage struct {
	RelayMessage *RelayMessage `protobuf:"bytes,3,opt,name=relay_message,json=relayMessage,proto3,oneof"`
}

type MasterPayload_Step

type MasterPayload_Step struct {
	Step *Step `protobuf:"bytes,2,opt,name=step,proto3,oneof"`
}

type RelayMessage

type RelayMessage struct {
	// The message destination UUID.
	Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
	// The serialized message contents.
	Message              *any.Any `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RelayMessage describes a graph message that should be relayed to a remote graph instance which is managed by another worker.

func (*RelayMessage) Descriptor

func (*RelayMessage) Descriptor() ([]byte, []int)

func (*RelayMessage) GetDestination

func (m *RelayMessage) GetDestination() string

func (*RelayMessage) GetMessage

func (m *RelayMessage) GetMessage() *any.Any

func (*RelayMessage) ProtoMessage

func (*RelayMessage) ProtoMessage()

func (*RelayMessage) Reset

func (m *RelayMessage) Reset()

func (*RelayMessage) String

func (m *RelayMessage) String() string

func (*RelayMessage) XXX_DiscardUnknown

func (m *RelayMessage) XXX_DiscardUnknown()

func (*RelayMessage) XXX_Marshal

func (m *RelayMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RelayMessage) XXX_Merge

func (m *RelayMessage) XXX_Merge(src proto.Message)

func (*RelayMessage) XXX_Size

func (m *RelayMessage) XXX_Size() int

func (*RelayMessage) XXX_Unmarshal

func (m *RelayMessage) XXX_Unmarshal(b []byte) error

type Step

type Step struct {
	// The type of this step.
	Type Step_Type `protobuf:"varint,1,opt,name=type,proto3,enum=proto.Step_Type" json:"type,omitempty"`
	// Workers use this field to submit their local aggregator delta values wen
	// reaching the POST step. The master collects the deltas, aggregates them to
	// its own aggregator values and broadcasts the global aggregator values in
	// the response. Workers must then *overwrite* their local aggregator values
	// with the values provided by the master.
	AggregatorValues map[string]*any.Any `` /* 197-byte string literal not displayed */
	// Workers use this field to submit their local active-in-step count when
	// reaching the POST_KEEP_RUNNING step. The step response broadcasted by
	// the master uses the same field to specify the global active-in-step count
	// that the workers should pass to the graph executor callbacks.
	ActiveInStep         int64    `protobuf:"varint,3,opt,name=activeInStep,proto3" json:"activeInStep,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Step describes the current state of a worker or a master. Workers send a Step message with their current state to enter a synchronization barrier and wait for the other workers. Once all workers reach the barrier, the master node (depending on the step type) processes the individual worker steps to update its global state and broadcasts a new Step message (with a matching step type) to notify the workers that they can exit the barrier.

func (*Step) Descriptor

func (*Step) Descriptor() ([]byte, []int)

func (*Step) GetActiveInStep

func (m *Step) GetActiveInStep() int64

func (*Step) GetAggregatorValues

func (m *Step) GetAggregatorValues() map[string]*any.Any

func (*Step) GetType

func (m *Step) GetType() Step_Type

func (*Step) ProtoMessage

func (*Step) ProtoMessage()

func (*Step) Reset

func (m *Step) Reset()

func (*Step) String

func (m *Step) String() string

func (*Step) XXX_DiscardUnknown

func (m *Step) XXX_DiscardUnknown()

func (*Step) XXX_Marshal

func (m *Step) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Step) XXX_Merge

func (m *Step) XXX_Merge(src proto.Message)

func (*Step) XXX_Size

func (m *Step) XXX_Size() int

func (*Step) XXX_Unmarshal

func (m *Step) XXX_Unmarshal(b []byte) error

type Step_Type

type Step_Type int32

The type of this step.

const (
	Step_INVALID Step_Type = 0
	// This step corresponds to the PRE step of the executor callback.
	Step_PRE Step_Type = 1
	// This step corresponds to the POST step of the executor callback.
	Step_POST Step_Type = 2
	// This step corresponds to the POST_KEEP_RUNNING step of the executor
	// callback.
	Step_POST_KEEP_RUNNING Step_Type = 3
	// This step indicates to the master that the worker has successfully
	// completed the graph execution and is ready to perist the computation
	// results.
	Step_EXECUTED_GRAPH Step_Type = 4
	// This step indicates to the master that the worker has successfully
	// persisted the computation results.
	Step_PESISTED_RESULTS Step_Type = 5
	// This step indicates to the master that the worker has completed the job.
	Step_COMPLETED_JOB Step_Type = 6
)

func (Step_Type) EnumDescriptor

func (Step_Type) EnumDescriptor() ([]byte, []int)

func (Step_Type) String

func (x Step_Type) String() string

type UnimplementedJobQueueServer

type UnimplementedJobQueueServer struct {
}

UnimplementedJobQueueServer can be embedded to have forward compatible implementations.

func (*UnimplementedJobQueueServer) JobStream

type WorkerPayload

type WorkerPayload struct {
	// Types that are valid to be assigned to Payload:
	//	*WorkerPayload_Step
	//	*WorkerPayload_RelayMessage
	Payload              isWorkerPayload_Payload `protobuf_oneof:"payload"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

WorkerPayload encapsulates the possible message types that a worker can send to a master node.

func (*WorkerPayload) Descriptor

func (*WorkerPayload) Descriptor() ([]byte, []int)

func (*WorkerPayload) GetPayload

func (m *WorkerPayload) GetPayload() isWorkerPayload_Payload

func (*WorkerPayload) GetRelayMessage

func (m *WorkerPayload) GetRelayMessage() *RelayMessage

func (*WorkerPayload) GetStep

func (m *WorkerPayload) GetStep() *Step

func (*WorkerPayload) ProtoMessage

func (*WorkerPayload) ProtoMessage()

func (*WorkerPayload) Reset

func (m *WorkerPayload) Reset()

func (*WorkerPayload) String

func (m *WorkerPayload) String() string

func (*WorkerPayload) XXX_DiscardUnknown

func (m *WorkerPayload) XXX_DiscardUnknown()

func (*WorkerPayload) XXX_Marshal

func (m *WorkerPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WorkerPayload) XXX_Merge

func (m *WorkerPayload) XXX_Merge(src proto.Message)

func (*WorkerPayload) XXX_OneofWrappers

func (*WorkerPayload) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*WorkerPayload) XXX_Size

func (m *WorkerPayload) XXX_Size() int

func (*WorkerPayload) XXX_Unmarshal

func (m *WorkerPayload) XXX_Unmarshal(b []byte) error

type WorkerPayload_RelayMessage

type WorkerPayload_RelayMessage struct {
	RelayMessage *RelayMessage `protobuf:"bytes,2,opt,name=relay_message,json=relayMessage,proto3,oneof"`
}

type WorkerPayload_Step

type WorkerPayload_Step struct {
	Step *Step `protobuf:"bytes,1,opt,name=step,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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