diff options
author | Andrea Smith <smit9523@umn.edu> | 2020-10-24 12:09:20 -0500 |
---|---|---|
committer | Andrea Smith <smit9523@umn.edu> | 2020-10-24 12:09:20 -0500 |
commit | 8fe201704fc1b7429518003e0da70c4615a9d087 (patch) | |
tree | 0a33f7ccb277e34701b144e3220504bcf3817230 /P2/lib | |
parent | Starting sendChunkData (diff) | |
download | csci4061-8fe201704fc1b7429518003e0da70c4615a9d087.tar csci4061-8fe201704fc1b7429518003e0da70c4615a9d087.tar.gz csci4061-8fe201704fc1b7429518003e0da70c4615a9d087.tar.bz2 csci4061-8fe201704fc1b7429518003e0da70c4615a9d087.tar.lz csci4061-8fe201704fc1b7429518003e0da70c4615a9d087.tar.xz csci4061-8fe201704fc1b7429518003e0da70c4615a9d087.tar.zst csci4061-8fe201704fc1b7429518003e0da70c4615a9d087.zip |
sendChunkData
Diffstat (limited to '')
-rw-r--r-- | P2/lib/utils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c index bbf55f8..b15a7c8 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -5,15 +5,19 @@ char *getChunkData(int mapperID) { // sends chunks of size 1024 to the mappers in RR fashion void sendChunkData(char *inputFile, int nMappers) { + msgBuffer message; key_t key; int msgid; // open message queue msgid = msgget(key, 0666 | IPC_CREAT); - msgBuffer -> msgText = 1; + message -> msgText = 1; + FILE *fptr = fopen(inputFile, "r"); // construct chunks of 1024 bytes - + while(fgets(msgText, chunkSize, fptr)) { + + } } // hash function to divide the list of word.txt files across reducers |