diff options
author | Matthew Strapp <strap012@umn.edu> | 2020-10-26 08:49:51 -0500 |
---|---|---|
committer | GitHub Enterprise <noreply-github@umn.edu> | 2020-10-26 08:49:51 -0500 |
commit | 3a06aa2a44eb3fa4850d7b12b8192fce1bdac578 (patch) | |
tree | 7c398b08a0be744d3301cd7f4448dd30d28fe541 | |
parent | Revert "Add new template" (diff) | |
parent | Add functions made before (diff) | |
download | csci4061-3a06aa2a44eb3fa4850d7b12b8192fce1bdac578.tar csci4061-3a06aa2a44eb3fa4850d7b12b8192fce1bdac578.tar.gz csci4061-3a06aa2a44eb3fa4850d7b12b8192fce1bdac578.tar.bz2 csci4061-3a06aa2a44eb3fa4850d7b12b8192fce1bdac578.tar.lz csci4061-3a06aa2a44eb3fa4850d7b12b8192fce1bdac578.tar.xz csci4061-3a06aa2a44eb3fa4850d7b12b8192fce1bdac578.tar.zst csci4061-3a06aa2a44eb3fa4850d7b12b8192fce1bdac578.zip |
Merge pull request #10 from STRAP012/NewTemplate
Change files changed by new template
(should probably not break things)
-rw-r--r-- | P2/include/utils.h | 2 | ||||
-rw-r--r-- | P2/lib/utils.c | 5 | ||||
-rw-r--r-- | P2/solutionexe/Makefile | 57 | ||||
-rw-r--r-- | P2/solutionexe/mapper | bin | 26444 -> 39000 bytes | |||
-rw-r--r-- | P2/solutionexe/mapreduce | bin | 24940 -> 32800 bytes | |||
-rw-r--r-- | P2/solutionexe/reducer | bin | 25676 -> 33968 bytes | |||
-rw-r--r-- | P2/solutionexe/test/T1/F1.txt | 2 |
7 files changed, 9 insertions, 57 deletions
diff --git a/P2/include/utils.h b/P2/include/utils.h index e3f5d43..2c91cdf 100644 --- a/P2/include/utils.h +++ b/P2/include/utils.h @@ -23,7 +23,6 @@ struct msgBuffer { }; // mapper side - int validChar(char c); char *getWord(char *chunk, int *i); char *getChunkData(int mapperID); @@ -31,7 +30,6 @@ void sendChunkData(char *inputFile, int nMappers); // reducer side - int hashFunction(char* key, int reducers); int getInterData(char *key, int reducerID); void shuffle(int nMappers, int nReducers); diff --git a/P2/lib/utils.c b/P2/lib/utils.c index 603a699..4d815a0 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -1,6 +1,5 @@ #include "utils.h" -//Receive from send and return the chonk char *getChunkData(int mapperID) { //Message struct msgBuffer message; @@ -79,7 +78,7 @@ void shuffle(int nMappers, int nReducers) { // check if the character is valid for a word int validChar(char c){ - return ((tolower(c) >= 'a') && tolower(c <='z')) || + return (tolower(c) >= 'a' && tolower(c) <='z') || (c >= '0' && c <= '9'); } @@ -141,4 +140,4 @@ void bookeepingCode(){ removeOutputDir(); sleep(1); createOutputDir(); -}
\ No newline at end of file +} diff --git a/P2/solutionexe/Makefile b/P2/solutionexe/Makefile index 231a15e..4a969ac 100644 --- a/P2/solutionexe/Makefile +++ b/P2/solutionexe/Makefile @@ -1,57 +1,10 @@ -CC=gcc -CFLAGS=-g +.PHONY: run -SRCDIR=src -INCLDIR=include -LIBDIR=lib - -mapreduce: $(SRCDIR)/mapreduce.c $(LIBDIR)/utils.o mapper reducer - $(CC) $(CFLAGS) -I$(INCLDIR) $(LIBDIR)/utils.o $(SRCDIR)/mapreduce.c -o mapreduce - -mapper: $(SRCDIR)/mapper.c $(LIBDIR)/utils.o - $(CC) $(CFLAGS) -I$(INCLDIR) $(LIBDIR)/utils.o $(SRCDIR)/mapper.c -o mapper - -reducer: $(SRCDIR)/reducer.c $(LIBDIR)/utils.o - $(CC) $(CFLAGS) -I$(INCLDIR) $(LIBDIR)/utils.o $(SRCDIR)/reducer.c -o reducer - -$(LIBDIR)/utils.o: $(LIBDIR)/utils.c - $(CC) $(CFLAGS) -I$(INCLDIR) -c $(LIBDIR)/utils.c -o $(LIBDIR)/utils.o - -.PHONY: run clean t1 t2 t3 - -#500KB -t1: -# make -i clean -# make +run: + chmod +x mapreduce + chmod +x mapper + chmod +x reducer ./mapreduce 5 2 test/T1/F1.txt -#44KB -t2: -# make -i clean -# make - ./mapreduce 5 2 test/T2/F2.txt - -#0KB -t3: -# make -i clean -# make - ./mapreduce 5 2 test/T3/F3.txt - -# m >= r - -# m=1 r=1 (min case) -t4: -# make -i clean -# make - ./mapreduce 1 1 test/T1/F1.txt - -# m=32 r=26 (max case) -t5: -# make -i clean -# make - ./mapreduce 32 26 test/T1/F1.txt - - clean: - rm lib/utils.o mapreduce mapper reducer rm -rf output
\ No newline at end of file diff --git a/P2/solutionexe/mapper b/P2/solutionexe/mapper Binary files differindex 15abd74..56be08c 100644 --- a/P2/solutionexe/mapper +++ b/P2/solutionexe/mapper diff --git a/P2/solutionexe/mapreduce b/P2/solutionexe/mapreduce Binary files differindex 28be9a0..3932e81 100644 --- a/P2/solutionexe/mapreduce +++ b/P2/solutionexe/mapreduce diff --git a/P2/solutionexe/reducer b/P2/solutionexe/reducer Binary files differindex 6d6ccd8..c801c99 100644 --- a/P2/solutionexe/reducer +++ b/P2/solutionexe/reducer diff --git a/P2/solutionexe/test/T1/F1.txt b/P2/solutionexe/test/T1/F1.txt new file mode 100644 index 0000000..8ab70be --- /dev/null +++ b/P2/solutionexe/test/T1/F1.txt @@ -0,0 +1,2 @@ + +To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have todayTo give you an estimation of the difference in the original and what we have todayTo give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have today. To give you an estimation of the difference in the original and what we have todayTo give you an estimation of the difference in the original and what we have today.
\ No newline at end of file |