aboutsummaryrefslogtreecommitdiffstats
path: root/P1/src
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-10-06 08:26:44 -0500
committerMatt Strapp <strap012@umn.edu>2020-10-06 08:26:44 -0500
commite66e195e7c175c738d0f11ba6d42eb4273f33b94 (patch)
tree311d24d47f7e905c7e04f2d3ad6a92569f09336c /P1/src
parentChange error (diff)
downloadcsci4061-e66e195e7c175c738d0f11ba6d42eb4273f33b94.tar
csci4061-e66e195e7c175c738d0f11ba6d42eb4273f33b94.tar.gz
csci4061-e66e195e7c175c738d0f11ba6d42eb4273f33b94.tar.bz2
csci4061-e66e195e7c175c738d0f11ba6d42eb4273f33b94.tar.lz
csci4061-e66e195e7c175c738d0f11ba6d42eb4273f33b94.tar.xz
csci4061-e66e195e7c175c738d0f11ba6d42eb4273f33b94.tar.zst
csci4061-e66e195e7c175c738d0f11ba6d42eb4273f33b94.zip
Add another define
Increase buffer size
Diffstat (limited to '')
-rw-r--r--P1/src/mapper.c2
-rw-r--r--P1/src/reducer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/P1/src/mapper.c b/P1/src/mapper.c
index 3a197e0..b401607 100644
--- a/P1/src/mapper.c
+++ b/P1/src/mapper.c
@@ -119,7 +119,7 @@ void writeIntermediateDS() {
}
// Put words and their corresponding 1's in a file named [the word].txt
- char filename[BUFFSIZE] = "";
+ char filename[DIRSIZE] = "";
sprintf(filename, "%s/%s.txt", mapOutDir, tempNode -> key);
FILE* fptr = fopen(filename, "w");
fprintf(fptr, "%s %s", tempNode -> key, ones);
diff --git a/P1/src/reducer.c b/P1/src/reducer.c
index f70c072..92914e2 100644
--- a/P1/src/reducer.c
+++ b/P1/src/reducer.c
@@ -75,7 +75,7 @@ void writeFinalDS(int reducerID){
while(tempNode != NULL) {
// Shove word and number of occurances in a file named word.txt
- char filename[BUFFSIZE] = "";
+ char filename[DIRSIZE] = "";
sprintf(filename, "output/ReduceOut/Reduce_%d.txt", reducerID);
FILE* fptr = fopen(filename, "a"); //append, not overwrite.
fprintf(fptr, "%s %d\n", tempNode -> key, tempNode -> value);