Documentation ¶
Index ¶
Constants ¶
const ( // MasterServiceName name of the master service in Consul. MasterServiceName = "master" // WorkerServiceName name of the worker service in Consul. WorkerServiceName = "worker" // GrpcConsulTag tag set for the worker to notify the clients that grpc API should be used. GrpcConsulTag = "grpc" // Separator separates key and value in intermediate files. Separator = ":::" // RetriesLimit number of retries of. RetriesLimit = 3 // MapPhase name of the map phase. MapPhase = "map" // ReducePhase name of the reduce phase. ReducePhase = "reduce" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger hold bacic info about logger configuration.
func (*Logger) Debug ¶
Debug logs the formatted message with level DEBUG - only if debug flag is set to true.
type MapReduce ¶
MapReduce it's interface for any job in gomr framework. Every gomr job should implement this interface.
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
Master holds information about the gomr Master service.
func (*Master) Start ¶
Start starts the gomr master service - creates the health check server, register master service in consul and tries to connect to available warokers. Func waits until it gets signal{Kill, Interrupt} or Stop func is called.
type Wrk ¶
type Wrk struct {
// contains filtered or unexported fields
}
Wrk holds information about the gomr Worker service.
func (*Wrk) Reduce ¶
Reduce starts reduce phase and returns the status of the tasks as long as its ongoing.