Flow
Class/DataType Design
- class worker
- def initialSetting()
- def sorting(blockList: List[Block]): List[Block]
- def sampling(blockList: List[Block], sampleSize: Int): List[Int]
- def partitioning(blockList: List[Block], pivot: List[Int]): List[Block]
- def shuffle(partitionedBlocks: List[Block])
- def merge(blockList: List[Block]): List[Block]
- 모든 block을 병합하여 하나의 정렬된 block 리스트로 반환
- class master
- def connectWorker
- def settingWorker
- worker 갯수 만큼 input을 나누어 각 worker에게 전달.
- def makePivot(keysFromWorkers: List[Int]): List[int]
- gRPC 관련 내용
- data type
- class Block
- dir: String
- range: (Int, Int)
- class Record(key: String, value: String)
- gensort에 의해 생성되는 [key-value]쌍
- key: Int
- value: List[Int]
- signal/request/gRPC 관련
Directory Structure
- build.sbt
- gensortScript
- data
- input(.txt?)
- output(.txt?)
- src
- main
- scala
- master
- masterNetwork.scala
- master.scala
- worker
- workerNetwork.scala
- worker.scala
- class worker …
- class block …
- network
- proto
- test
- scala
- networkTest
- masterTest
- workerTest