-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (22 loc) · 887 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
format:
go fmt github.com/bensooraj/experiment-mr/...
clean:
@echo "Removing all intermediate and output files from the previous run"
@find . -name "mr-intermediate-*.json" | xargs rm
@find . -name "mr-out-*" | xargs rm
plugin:
@echo "Building the word count pluging..."
@find . -name "wc.so" | xargs rm
go build -race -o=plugins -buildmode=plugin plugins/wc.go
start-coordinator: clean
@echo "Starting the coordinator..."
go run -race coordinator/coordinator.go data/pg-*.txt
start-worker:
@echo "Starting the worker..."
@mkdir -p output
go run -race worker/worker.go plugins/wc.so
start-parallel-workers: plugin
@chmod u+x parallel_workers.sh
@mkdir -p output
@echo "Starting 3 workers in parallel..."
@./parallel_workers.sh "go run -race worker/worker.go plugins/wc.so" "go run -race worker/worker.go plugins/wc.so" "go run -race worker/worker.go plugins/wc.so"