From f45d7a94d42ff6add4df7c385b17aca3746d3b1e Mon Sep 17 00:00:00 2001 From: afederici <ajf5@illinois.edu> Date: Sun, 29 Nov 2020 22:29:19 -0600 Subject: [PATCH] cpp branch --- Wc | Bin 189120 -> 189120 bytes Wr | Bin 184720 -> 184720 bytes src/Node.cpp | 13 ++++++------- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Wc b/Wc index edb37a67d1ef14ee1b9d877d4862745370f07d39..f30f75cda965d4414fcd8a57b1ba5226100aa4a2 100755 GIT binary patch delta 68 zcmV-K0K5Od#S6g23xKo%@OT0cb+__(0nRo85p}o1uK~KU4mdSpFf=kQZvbCyVQFrc a5orQ4x4dEkEj$KeVl^{lFt_iX0?|Xgh#Eow delta 68 zcmX?bl>5L@?uIRlA1atS3b%i%U_56AVjNn}xN8$%qM?y-s;OQ+Lws&xX5MtcOeUl4 Xdy<%RZP+Y~Es~9sx4)mqbkP|A@4p)` diff --git a/Wr b/Wr index 7aba1f9bf724216235c6313011760ed5b8a82205..ddc843818af4f61379271e70bd2830f9011761d9 100755 GIT binary patch delta 68 zcmV-K0K5N?qYIFu3xKo%NO%Gfb+<}*0ZuUj5_PwlsR5;}4mf3IWHdA`ZvbCyVQFrc a?)(8Vw|`dxJT?X~VP!KpGq=Hw0?$KB_ZYDN delta 68 zcmV-K0K5N?qYIFu3xKo%NO%H?akol%0ZuUjigCA^sR5;}4mM+EWjA9kZvbCyVQFrc a?)(8Vw|`dxJT?YmGBss5VYk7J0?$K&5E=OZ diff --git a/src/Node.cpp b/src/Node.cpp index 8acda1a..0809d26 100644 --- a/src/Node.cpp +++ b/src/Node.cpp @@ -1072,16 +1072,15 @@ void Node::handleTcpMessage() cout << "[ERROR] Not enough nodes for Maple. Need 4 minimum (3 workers, 1 leader)" << endl; break; } - //cout << "[DIRECTORY] " << sdfs_dir; + cout << "[DIRECTORY] " << sdfs_dir; for (auto &e: fileSizes){ - //cout << e.first << " | " << to_string(get<1>(e.second)) << " "; if (strncmp(e.first.c_str(), sdfs_dir.c_str(), sdfs_dir.size()) == 0){ - //cout << " was a match "; + cout << " , " << e.first << " | " << to_string(get<1>(e.second)); directory.push_back(make_tuple(e.first, get<1>(e.second))); total_lines += get<1>(e.second); } } - //cout << endl << "[MAPLE] need to process " << to_string(total_lines) << endl; + cout << endl << "[MAPLE] need to process " << to_string(total_lines) << endl; for (auto &e : membershipList) if (get<0>(e.first).compare(nodeInformation.ip)) aliveNodes.push_back(e.first); vector<tuple<string,string,string>> mapleNodes = randItems(workers, aliveNodes); string includedDebug = ""; @@ -1092,12 +1091,12 @@ void Node::handleTcpMessage() includedDebug += get<0>(e); } vector<string> messagesToSend; //used so we get our full assignments before scheduling - //cout << "[MAPLE] " << includedDebug << " are the worker nodes" << endl; + cout << "[MAPLE] " << includedDebug << " are the worker nodes" << endl; for (auto &e: directory){ start = 0; string file = get<0>(e); int lines = get<1>(e); - //cout << "[MAPLE] file: " << file << " - " << to_string(lines) << endl; + cout << "[MAPLE] file: " << file << " - " << to_string(lines) << endl; while (start < lines){ s = file + "::" + to_string(start); id = workerRing->locateClosestNode(s); @@ -1107,7 +1106,7 @@ void Node::handleTcpMessage() string processor = workerRing->getValue(id); //processor is a maple worker workerProcessing[processor].push_back(make_tuple(file, to_string(start))); workerTasks[processor].insert(make_tuple(file, to_string(start))); - //cout << "[MAPLE] assign file " << file << " at " << to_string(start) << " to " << processor << endl; + cout << "[MAPLE] assign file " << file << " at " << to_string(start) << " to " << processor << endl; mapleSending[make_tuple(file, to_string(start))] = make_tuple(sender, 0); string maplemsg = sender + "::" + processor + "::" + exe + "::" + s; //sender, processor, exec, file, start -- GitLab