Documentation
¶
Index ¶
- Constants
- Variables
- func ValidaMode(mode Mode) bool
- type ConfigOptions
- type Hasher
- type Job
- type JobStatus
- type KeyValue
- type Mapper
- type MasterConfigOptions
- type MasterConfiguration
- type Mode
- type PingArg
- type Reducer
- type RegisterArg
- type RegisterResult
- type Result
- type StorageType
- type Task
- type TaskState
- type TaskType
- type TasksStatus
- type WorkerConfigOptions
- type WorkerConfiguration
- type WorkerStatus
Constants ¶
View Source
const ( Parallel = "Parallel" Sequential = "Sequential" )
View Source
const ( MapOutputFilePrefix = "map-output-tmp" ReduceOutputFilePrefix = "reduce-output-tmp" FinalOutputFIlePrefix = "final-output" )
View Source
const ( Map = "Map" Reduce = "Reduce" )
View Source
const ( Pending = "Pending" Running = "Running" Finished = "Finished" )
View Source
const ( FileIOErr = iota RpcCallErr MapErr ReduceErr UnknownTask ParallelLimitErr ExceptionErr )
View Source
const (
LocalStorage = "local"
)
Variables ¶
View Source
var SucceededResult = Result{Code: 0, Message: "Succeeded"}
Functions ¶
func ValidaMode ¶
Types ¶
type ConfigOptions ¶
type ConfigOptions struct {
// Common options.
JobName string
RootDir string
Address string
ReduceNum int
Storage StorageType
MasterConfigOptions
WorkerConfigOptions
}
type Hasher ¶
func DefaultHasher ¶
func DefaultHasher() Hasher
type JobStatus ¶
type JobStatus struct {
Message string `json:"message,omitempty"`
Output string `json:"output,omitempty"`
MapStatus TasksStatus `json:"mapStatus"`
ReduceStatus TasksStatus `json:"reduceStatus"`
}
type MasterConfigOptions ¶
type MasterConfiguration ¶
type RegisterResult ¶
type RegisterResult struct {
Result
}
type StorageType ¶
type StorageType = string
type TasksStatus ¶
type WorkerConfigOptions ¶
type WorkerConfiguration ¶
Click to show internal directories.
Click to hide internal directories.