Documentation ¶
Overview ¶
Package service is a generated protocol buffer package.
It is generated from these files:
mr.proto
It has these top-level messages:
MrStatus MrJob
Index ¶
- Variables
- func RegisterMapReduceServer(s *grpc.Server, srv MapReduceServer)
- func RegisterMasterServer(s *grpc.Server, srv MasterServer)
- type MapReduceClient
- type MapReduceServer
- type MapReduce_MapClient
- type MapReduce_MapServer
- type MapReduce_ReduceClient
- type MapReduce_ReduceServer
- type MasterClient
- type MasterServer
- type Master_SubmitClient
- type Master_SubmitServer
- type MrJob
- func (*MrJob) Descriptor() ([]byte, []int)
- func (m *MrJob) GetCurrentReduceTask() int32
- func (m *MrJob) GetInput() string
- func (m *MrJob) GetMapReducePlugin() []byte
- func (m *MrJob) GetMapTasksNum() int32
- func (m *MrJob) GetName() string
- func (m *MrJob) GetReduceTasksNum() int32
- func (m *MrJob) GetWorkDir() string
- func (*MrJob) ProtoMessage()
- func (m *MrJob) Reset()
- func (m *MrJob) String() string
- type MrStatus
- type Phase
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var Phase_name = map[int32]string{
0: "MAP",
1: "REDUCE",
}
View Source
var Phase_value = map[string]int32{
"MAP": 0,
"REDUCE": 1,
}
View Source
var Status_name = map[int32]string{
0: "DONE",
1: "ALL_DONE",
2: "PLUGIN_LOADED",
3: "INPUT_LOADED",
4: "INTERMEDIATE_FILES_CREATED",
5: "ERROR",
}
View Source
var Status_value = map[string]int32{
"DONE": 0,
"ALL_DONE": 1,
"PLUGIN_LOADED": 2,
"INPUT_LOADED": 3,
"INTERMEDIATE_FILES_CREATED": 4,
"ERROR": 5,
}
Functions ¶
func RegisterMapReduceServer ¶
func RegisterMapReduceServer(s *grpc.Server, srv MapReduceServer)
func RegisterMasterServer ¶
func RegisterMasterServer(s *grpc.Server, srv MasterServer)
Types ¶
type MapReduceClient ¶
type MapReduceClient interface { // Map starts map phase and returns the status of the tasks as long as its ongoing. Map(ctx context.Context, in *MrJob, opts ...grpc.CallOption) (MapReduce_MapClient, error) // Reduce starts reduce phase and returns the status of the tasks as long as its ongoing. Reduce(ctx context.Context, in *MrJob, opts ...grpc.CallOption) (MapReduce_ReduceClient, error) }
func NewMapReduceClient ¶
func NewMapReduceClient(cc *grpc.ClientConn) MapReduceClient
type MapReduceServer ¶
type MapReduceServer interface { // Map starts map phase and returns the status of the tasks as long as its ongoing. Map(*MrJob, MapReduce_MapServer) error // Reduce starts reduce phase and returns the status of the tasks as long as its ongoing. Reduce(*MrJob, MapReduce_ReduceServer) error }
type MapReduce_MapClient ¶
type MapReduce_MapClient interface { Recv() (*MrStatus, error) grpc.ClientStream }
type MapReduce_MapServer ¶
type MapReduce_MapServer interface { Send(*MrStatus) error grpc.ServerStream }
type MapReduce_ReduceClient ¶
type MapReduce_ReduceClient interface { Recv() (*MrStatus, error) grpc.ClientStream }
type MapReduce_ReduceServer ¶
type MapReduce_ReduceServer interface { Send(*MrStatus) error grpc.ServerStream }
type MasterClient ¶
type MasterClient interface { // Submit submits map reduce job and returns stream of statuses until the job is ongoing. Submit(ctx context.Context, in *MrJob, opts ...grpc.CallOption) (Master_SubmitClient, error) }
func NewMasterClient ¶
func NewMasterClient(cc *grpc.ClientConn) MasterClient
type MasterServer ¶
type MasterServer interface { // Submit submits map reduce job and returns stream of statuses until the job is ongoing. Submit(*MrJob, Master_SubmitServer) error }
type Master_SubmitClient ¶
type Master_SubmitClient interface { Recv() (*MrStatus, error) grpc.ClientStream }
type Master_SubmitServer ¶
type Master_SubmitServer interface { Send(*MrStatus) error grpc.ServerStream }
type MrJob ¶
type MrJob struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` MapTasksNum int32 `protobuf:"varint,2,opt,name=mapTasksNum" json:"mapTasksNum,omitempty"` ReduceTasksNum int32 `protobuf:"varint,3,opt,name=reduceTasksNum" json:"reduceTasksNum,omitempty"` CurrentReduceTask int32 `protobuf:"varint,4,opt,name=currentReduceTask" json:"currentReduceTask,omitempty"` Input string `protobuf:"bytes,5,opt,name=input" json:"input,omitempty"` WorkDir string `protobuf:"bytes,6,opt,name=workDir" json:"workDir,omitempty"` MapReducePlugin []byte `protobuf:"bytes,7,opt,name=mapReducePlugin,proto3" json:"mapReducePlugin,omitempty"` }
func (*MrJob) Descriptor ¶
func (*MrJob) GetCurrentReduceTask ¶
func (*MrJob) GetMapReducePlugin ¶
func (*MrJob) GetMapTasksNum ¶
func (*MrJob) GetReduceTasksNum ¶
func (*MrJob) GetWorkDir ¶
func (*MrJob) ProtoMessage ¶
func (*MrJob) ProtoMessage()
type MrStatus ¶
type MrStatus struct { ServiceId string `protobuf:"bytes,1,opt,name=serviceId" json:"serviceId,omitempty"` Status Status `protobuf:"varint,2,opt,name=status,enum=service.Status" json:"status,omitempty"` Phase Phase `protobuf:"varint,3,opt,name=phase,enum=service.Phase" json:"phase,omitempty"` Msg string `protobuf:"bytes,4,opt,name=msg" json:"msg,omitempty"` }
func (*MrStatus) Descriptor ¶
func (*MrStatus) GetServiceId ¶
func (*MrStatus) ProtoMessage ¶
func (*MrStatus) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.