diff --git a/Wc b/Wc index edb37a67d1ef14ee1b9d877d4862745370f07d39..f30f75cda965d4414fcd8a57b1ba5226100aa4a2 100755 Binary files a/Wc and b/Wc differ diff --git a/Wr b/Wr index 7aba1f9bf724216235c6313011760ed5b8a82205..ddc843818af4f61379271e70bd2830f9011761d9 100755 Binary files a/Wr and b/Wr differ diff --git a/src/Node.cpp b/src/Node.cpp index 8acda1ade98e10eb07c9cd52e1d32b7da6e55de4..0809d26e69dbb966c91c5b92df6800aa22341e88 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