Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some typos #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/ps/internal/van.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ class Van {
void ProcessBarrierCommand(Message* msg);

/**
* \brief processing logic of AddNode message (run on each node)
* \brief processing logic of Heartbeat message (run on each node)
*/
void ProcessHearbeat(Message* msg);
void ProcessHeartbeat(Message* msg);

/**
* \brief processing logic of Data message
Expand Down
11 changes: 5 additions & 6 deletions src/van.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include "./resender.h"
namespace ps {

// interval in second between to heartbeast signals. 0 means no heartbeat.
// don't send heartbeast in default. because if the scheduler received a
// interval in second between two heartbeast signals. 0 means no heartbeat.
// don't send heartbeat in default. because if the scheduler received a
// heartbeart signal from a node before connected to that node, then it could be
// problem.
static const int kDefaultHeartbeatInterval = 0;
Expand Down Expand Up @@ -155,7 +155,7 @@ void Van::UpdateLocalID(Message* msg, std::unordered_set<int>* deadnodes_set,
}
}

void Van::ProcessHearbeat(Message* msg) {
void Van::ProcessHeartbeat(Message* msg) {
auto& ctrl = msg->meta.control;
time_t t = time(NULL);
for (auto &node : ctrl.node) {
Expand Down Expand Up @@ -254,8 +254,7 @@ void Van::Start(int customer_id) {
if (is_scheduler_) {
my_node_ = scheduler_;
} else {
auto role = is_scheduler_ ? Node::SCHEDULER :
(Postoffice::Get()->is_worker() ? Node::WORKER : Node::SERVER);
auto role = Postoffice::Get()->is_worker() ? Node::WORKER : Node::SERVER;
const char *nhost = Environment::Get()->find("DMLC_NODE_HOST");
std::string ip;
if (nhost) ip = std::string(nhost);
Expand Down Expand Up @@ -401,7 +400,7 @@ void Van::Receiving() {
} else if (ctrl.cmd == Control::BARRIER) {
ProcessBarrierCommand(&msg);
} else if (ctrl.cmd == Control::HEARTBEAT) {
ProcessHearbeat(&msg);
ProcessHeartbeat(&msg);
} else {
LOG(WARNING) << "Drop unknown typed message " << msg.DebugString();
}
Expand Down