mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-23 02:24:01 +00:00
feat: Added Map Reduce Design Pattern (#3184)
* MapReduce design pattern added * Updated README.md * added module to parent pom
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -0,0 +1,24 @@
|
||||
@startuml
|
||||
package com.iluwatar {
|
||||
class Main {
|
||||
+ Main()
|
||||
+ main(args : String[]) {static}
|
||||
}
|
||||
class MapReduce {
|
||||
+ MapReduce()
|
||||
+ mapReduce(inputs : List<String>) : List<Map.Entry<String, Integer>> {static}
|
||||
}
|
||||
class Mapper {
|
||||
+ Mapper()
|
||||
+ map(input : String) : Map<String, Integer> {static}
|
||||
}
|
||||
class Reducer {
|
||||
+ Reducer()
|
||||
+ reduce(grouped : Map<String, List<Integer>>) : List<Map.Entry<String, Integer>> {static}
|
||||
}
|
||||
class Shuffler {
|
||||
+ Shuffler()
|
||||
+ shuffleAndSort(mapped : List<Map<String, Integer>>) : Map<String, List<Integer>> {static}
|
||||
}
|
||||
}
|
||||
@enduml
|
||||
Reference in New Issue
Block a user