30 lines
481 B
Go
30 lines
481 B
Go
package main
|
|
|
|
//
|
|
// start the coordinator process, which is implemented
|
|
// in ../mr/coordinator.go
|
|
//
|
|
// go run mrcoordinator.go pg*.txt
|
|
//
|
|
// Please do not change this file.
|
|
//
|
|
|
|
import "6.5840/mr"
|
|
import "time"
|
|
import "os"
|
|
import "fmt"
|
|
|
|
func main() {
|
|
if len(os.Args) < 2 {
|
|
fmt.Fprintf(os.Stderr, "Usage: mrcoordinator inputfiles...\n")
|
|
os.Exit(1)
|
|
}
|
|
|
|
m := mr.MakeCoordinator(os.Args[1:], 10)
|
|
for m.Done() == false {
|
|
time.Sleep(time.Second)
|
|
}
|
|
|
|
time.Sleep(time.Second)
|
|
}
|