Documentation
¶
Overview ¶
Package mapreduce provides a simple abstraction for the general Map/Reduce pattern.
Example ¶
conf := NewMapReduceConfig() // Feed input channel go func(in chan interface{}) { for i := 0; i < 100; i++ { in <- i } close(in) }(conf.InChan) var mr ExampleMapReducer result, _ := Run(&mr, conf) fmt.Println(result)
Output: 4950
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(mr MapReduce, c *Configuration) (interface{}, error)
Run executes the MapReduce process.
Types ¶
type Configuration ¶
type Configuration struct { MapperCount int InChan chan interface{} OutChan chan interface{} }
Configuration used by the Map Reducer.
func NewMapReduceConfig ¶
func NewMapReduceConfig() *Configuration
NewMapReduceConfig returns a MapReduce Configuration struct with sensible defaults.
Click to show internal directories.
Click to hide internal directories.