项目作者: therne

项目描述 :
Less-Resilient MapReduce for Go
高级语言: Go
项目地址: git://github.com/therne/lrmr.git
创建时间: 2020-01-29T08:21:55Z
项目社区:https://github.com/therne/lrmr

开源协议:

下载


lrmr

Online MapReduce framework for Go, which is capable for jobs in sub-second.

  • Sacrificing resilience for fast performance
  • Easily scalable onto distributed clusters
  • Easily embeddable to existing applications
  • Uses etcd for cluster management / coordination
  1. package main
  2. import (
  3. "context"
  4. "fmt"
  5. "github.com/ab180/lrmr"
  6. . "github.com/ab180/lrmr/test"
  7. )
  8. func main() {
  9. m, err := lrmr.RunMaster()
  10. if err != nil {
  11. panic(err)
  12. }
  13. m.Start()
  14. defer m.Stop()
  15. result, err := lrmr.NewSession(context.TODO(), m).
  16. FromFile("./testdata/").
  17. FlatMap(DecodeCSV()).
  18. GroupByKey().
  19. Reduce(Count()).
  20. Collect()
  21. if err != nil {
  22. panic(err)
  23. }
  24. fmt.Println("Done!", result)
  25. }

Building and Developing lrmr

Requirements

  • Go 1.14 or above

LICENSE: MIT