From 4b6bc26b3ed371fb9914e39bb194decf30585db7 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 3 Nov 2020 18:44:40 -0600 Subject: help --- P2/lib/utils.c | 4 ++++ P2/lib/utils.o | Bin 0 -> 18376 bytes P2/mapper | Bin 0 -> 32968 bytes P2/mapreduce | Bin 0 -> 30648 bytes P2/reducer | Bin 0 -> 31896 bytes 5 files changed, 4 insertions(+) create mode 100644 P2/lib/utils.o create mode 100755 P2/mapper create mode 100755 P2/mapreduce create mode 100755 P2/reducer diff --git a/P2/lib/utils.c b/P2/lib/utils.c index 8549d8e..eda26e9 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -119,6 +119,10 @@ void shuffle(int nMappers, int nReducers) { printf("%ld\n", message.msgType); msgsnd(id, &message, MSGSIZE, 0); } + for (int i = 1; i <= nReducers; i++) { + struct msgBuffer END = {i, "END"}; + msgsnd(id, &END, MSGSIZE, 0); + } closedir(dir); } } diff --git a/P2/lib/utils.o b/P2/lib/utils.o new file mode 100644 index 0000000..349a294 Binary files /dev/null and b/P2/lib/utils.o differ diff --git a/P2/mapper b/P2/mapper new file mode 100755 index 0000000..2d9a8f6 Binary files /dev/null and b/P2/mapper differ diff --git a/P2/mapreduce b/P2/mapreduce new file mode 100755 index 0000000..4120c34 Binary files /dev/null and b/P2/mapreduce differ diff --git a/P2/reducer b/P2/reducer new file mode 100755 index 0000000..1e7af57 Binary files /dev/null and b/P2/reducer differ -- cgit v1.2.3