You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 05:23:37 UTC
svn commit: r1131565 - in /incubator/mesos/trunk/src: master.cpp
messages.hpp slave.cpp
Author: benh
Date: Sun Jun 5 03:23:37 2011
New Revision: 1131565
URL: http://svn.apache.org/viewvc?rev=1131565&view=rev
Log:
undo last commit, something was wrong with it, I reverse patched it back
Modified:
incubator/mesos/trunk/src/master.cpp
incubator/mesos/trunk/src/messages.hpp
incubator/mesos/trunk/src/slave.cpp
Modified: incubator/mesos/trunk/src/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master.cpp?rev=1131565&r1=1131564&r2=1131565&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master.cpp (original)
+++ incubator/mesos/trunk/src/master.cpp Sun Jun 5 03:23:37 2011
@@ -319,6 +319,27 @@ void Master::operator () ()
break;
}
+ case F2M_REREGISTER_FRAMEWORK: {
+
+ Framework *framework = new Framework(from());
+ unpack<F2M_REREGISTER_FRAMEWORK>(framework->id,
+ framework->name,
+ framework->user,
+ framework->executorInfo);
+ LOG(INFO) << "Registering " << framework << " at " << framework->pid;
+ frameworks[framework->id] = framework;
+ pidToFid[framework->pid] = framework->id;
+
+ updateFrameworkTasks();
+
+ link(framework->pid);
+ send(framework->pid, pack<M2F_REGISTER_REPLY>(framework->id));
+ allocator->frameworkAdded(framework);
+ if (framework->executorInfo.uri == "")
+ terminateFramework(framework, 1, "No executor URI given");
+ break;
+ }
+
case F2M_UNREGISTER_FRAMEWORK: {
FrameworkID fid;
unpack<F2M_UNREGISTER_FRAMEWORK>(fid);
@@ -427,7 +448,7 @@ void Master::operator () ()
slaves[slave->id] = slave;
pidToSid[slave->pid] = slave->id;
link(slave->pid);
- send(slave->pid, pack<M2S_REREGISTER_REPLY>());
+ send(slave->pid, pack<M2S_REGISTER_REPLY>(slave->id));
allocator->slaveAdded(slave);
break;
}
Modified: incubator/mesos/trunk/src/messages.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/messages.hpp?rev=1131565&r1=1131564&r2=1131565&view=diff
==============================================================================
--- incubator/mesos/trunk/src/messages.hpp (original)
+++ incubator/mesos/trunk/src/messages.hpp Sun Jun 5 03:23:37 2011
@@ -52,7 +52,6 @@ enum MessageType {
/* From master to slave. */
M2S_REGISTER_REPLY,
- M2S_REREGISTER_REPLY,
M2S_RUN_TASK,
M2S_KILL_TASK,
M2S_KILL_FRAMEWORK,
@@ -203,9 +202,6 @@ TUPLE(LE_NEWLEADER,
TUPLE(M2S_REGISTER_REPLY,
(SlaveID));
-TUPLE(M2S_REREGISTER_REPLY,
- ());
-
TUPLE(M2S_RUN_TASK,
(FrameworkID,
TaskID,
Modified: incubator/mesos/trunk/src/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave.cpp?rev=1131565&r1=1131564&r2=1131565&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave.cpp (original)
+++ incubator/mesos/trunk/src/slave.cpp Sun Jun 5 03:23:37 2011
@@ -191,12 +191,6 @@ void Slave::operator () ()
break;
}
- case M2S_REREGISTER_REPLY: {
- LOG(INFO) << "Registered with master; given slave ID " << this->id;
- link(spawn(new Heart(master, this->getPID(), this->id)));
- break;
- }
-
case M2S_RUN_TASK: {
string fwName, user, taskName, taskArg;
ExecutorInfo execInfo;