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:21:31 UTC

svn commit: r1131551 - in /incubator/mesos/trunk/src: master.cpp nexus_sched.cpp

Author: benh
Date: Sun Jun  5 03:21:31 2011
New Revision: 1131551

URL: http://svn.apache.org/viewvc?rev=1131551&view=rev
Log:
Fix a bug in C API that didn't report executor correctly (due to driver
parameter being added to getExecutorInfo and getFrameworkName). Also
improved the reporting of this condition by making it call error().

Modified:
    incubator/mesos/trunk/src/master.cpp
    incubator/mesos/trunk/src/nexus_sched.cpp

Modified: incubator/mesos/trunk/src/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master.cpp?rev=1131551&r1=1131550&r2=1131551&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master.cpp (original)
+++ incubator/mesos/trunk/src/master.cpp Sun Jun  5 03:21:31 2011
@@ -273,6 +273,8 @@ void Master::operator () ()
       link(framework->pid);
       send(framework->pid, pack<M2F_REGISTER_REPLY>(fid));
       allocator->frameworkAdded(framework);
+      if (framework->executorInfo.uri == "")
+        terminateFramework(framework, 1, "No executor URI given");
       break;
     }
 

Modified: incubator/mesos/trunk/src/nexus_sched.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/nexus_sched.cpp?rev=1131551&r1=1131550&r2=1131551&view=diff
==============================================================================
--- incubator/mesos/trunk/src/nexus_sched.cpp (original)
+++ incubator/mesos/trunk/src/nexus_sched.cpp Sun Jun  5 03:21:31 2011
@@ -218,7 +218,7 @@ string Scheduler::getFrameworkName(Sched
  */
 ExecutorInfo Scheduler::getExecutorInfo(SchedulerDriver*)
 {
-  return ExecutorInfo("null", "");
+  return ExecutorInfo("", "");
 }
 
 
@@ -463,12 +463,12 @@ public:
 
   virtual ~CScheduler() {}
 
-  virtual string getFrameworkName()
+  virtual string getFrameworkName(SchedulerDriver*)
   {
     return frameworkName;
   }
 
-  virtual ExecutorInfo getExecutorInfo()
+  virtual ExecutorInfo getExecutorInfo(SchedulerDriver*)
   {
     return execInfo;
   }