aboutsummaryrefslogtreecommitdiffstats
path: root/P2
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-11-03 18:44:40 -0600
committerMatt Strapp <strap012@umn.edu>2020-11-03 18:44:40 -0600
commit4b6bc26b3ed371fb9914e39bb194decf30585db7 (patch)
treea193f679504feffc39de4190e996fffccec5f1c3 /P2
parentget rid of broken (diff)
downloadcsci4061-4b6bc26b3ed371fb9914e39bb194decf30585db7.tar
csci4061-4b6bc26b3ed371fb9914e39bb194decf30585db7.tar.gz
csci4061-4b6bc26b3ed371fb9914e39bb194decf30585db7.tar.bz2
csci4061-4b6bc26b3ed371fb9914e39bb194decf30585db7.tar.lz
csci4061-4b6bc26b3ed371fb9914e39bb194decf30585db7.tar.xz
csci4061-4b6bc26b3ed371fb9914e39bb194decf30585db7.tar.zst
csci4061-4b6bc26b3ed371fb9914e39bb194decf30585db7.zip
help
Diffstat (limited to 'P2')
-rw-r--r--P2/lib/utils.c4
-rw-r--r--P2/lib/utils.obin0 -> 18376 bytes
-rwxr-xr-xP2/mapperbin0 -> 32968 bytes
-rwxr-xr-xP2/mapreducebin0 -> 30648 bytes
-rwxr-xr-xP2/reducerbin0 -> 31896 bytes
5 files changed, 4 insertions, 0 deletions
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
--- /dev/null
+++ b/P2/lib/utils.o
Binary files differ
diff --git a/P2/mapper b/P2/mapper
new file mode 100755
index 0000000..2d9a8f6
--- /dev/null
+++ b/P2/mapper
Binary files differ
diff --git a/P2/mapreduce b/P2/mapreduce
new file mode 100755
index 0000000..4120c34
--- /dev/null
+++ b/P2/mapreduce
Binary files differ
diff --git a/P2/reducer b/P2/reducer
new file mode 100755
index 0000000..1e7af57
--- /dev/null
+++ b/P2/reducer
Binary files differ