mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r1364837 - in /incubator/mesos/trunk/src: local/main.cpp master/flags.hpp master/main.cpp master/master.cpp slave/flags.hpp slave/main.cpp
Date Mon, 23 Jul 2012 23:23:41 GMT
Author: benh
Date: Mon Jul 23 23:23:40 2012
New Revision: 1364837

URL: http://svn.apache.org/viewvc?rev=1364837&view=rev
Log:
Fixes type of port and added some log lines (contributed by Vinod
Kone, https://reviews.apache.org/r/6039).

Modified:
    incubator/mesos/trunk/src/local/main.cpp
    incubator/mesos/trunk/src/master/flags.hpp
    incubator/mesos/trunk/src/master/main.cpp
    incubator/mesos/trunk/src/master/master.cpp
    incubator/mesos/trunk/src/slave/flags.hpp
    incubator/mesos/trunk/src/slave/main.cpp

Modified: incubator/mesos/trunk/src/local/main.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/local/main.cpp?rev=1364837&r1=1364836&r2=1364837&view=diff
==============================================================================
--- incubator/mesos/trunk/src/local/main.cpp (original)
+++ incubator/mesos/trunk/src/local/main.cpp Mon Jul 23 23:23:40 2012
@@ -71,7 +71,7 @@ int main(int argc, char **argv)
   // The following flags are executable specific (e.g., since we only
   // have one instance of libprocess per execution, we only want to
   // advertise the port and ip option once, here).
-  short port;
+  uint16_t port;
   flags.add(&port, "port", "Port to listen on", 5050);
 
   Option<string> ip;

Modified: incubator/mesos/trunk/src/master/flags.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/flags.hpp?rev=1364837&r1=1364836&r2=1364837&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/flags.hpp (original)
+++ incubator/mesos/trunk/src/master/flags.hpp Mon Jul 23 23:23:40 2012
@@ -65,7 +65,7 @@ public:
   bool root_submissions;
   std::string slaves;
   std::string webui_dir;
-  short webui_port;
+  uint16_t webui_port;
   std::string whitelist;
 };
 

Modified: incubator/mesos/trunk/src/master/main.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/main.cpp?rev=1364837&r1=1364836&r2=1364837&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/main.cpp (original)
+++ incubator/mesos/trunk/src/master/main.cpp Mon Jul 23 23:23:40 2012
@@ -63,7 +63,7 @@ int main(int argc, char** argv)
   // The following flags are executable specific (e.g., since we only
   // have one instance of libprocess per execution, we only want to
   // advertise the port and ip option once, here).
-  short port;
+  uint16_t port;
   flags.add(&port, "port", "Port to listen on", 5050);
 
   Option<string> ip;

Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1364837&r1=1364836&r2=1364837&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Mon Jul 23 23:23:40 2012
@@ -505,7 +505,8 @@ void Master::exited(const UPID& pid)
 
   foreachvalue (Slave* slave, slaves) {
     if (slave->pid == pid) {
-      LOG(INFO) << "Slave " << slave->id << "(" << slave->info.hostname()
<< ") disconnected";
+      LOG(INFO) << "Slave " << slave->id << "(" << slave->info.hostname()
+                << ") disconnected";
       removeSlave(slave);
       return;
     }
@@ -1336,6 +1337,11 @@ struct ResourceUsageChecker : TaskInfoVi
     Resources taskResources = task.resources();
 
     if (!((usedResources + taskResources) <= offer->resources())) {
+      LOG(WARNING) << "Task " << task.task_id() << " attempted to use "
+                   << taskResources << " combined with already used "
+                   << usedResources << " is greater than offered "
+                   << offer->resources();
+
       return TaskInfoError::some("Task uses more resources than offered");
     }
 
@@ -1346,6 +1352,8 @@ struct ResourceUsageChecker : TaskInfoVi
       foreach (const Resource& resource, task.executor().resources()) {
         if (!Resources::isAllocatable(resource)) {
           // TODO(benh): Send back the invalid resources?
+          LOG(WARNING) << "Executor for task " << task.task_id()
+                       << " uses invalid resources " << resource;
           return TaskInfoError::some("Task's executor uses invalid resources");
         }
       }
@@ -1356,10 +1364,10 @@ struct ResourceUsageChecker : TaskInfoVi
         if (!slave->hasExecutor(framework->id, task.executor().executor_id())) {
           taskResources += task.executor().resources();
           if (!((usedResources + taskResources) <= offer->resources())) {
-            LOG(WARNING) << "Task " << task.task_id() << " attempted to
use "
-                         << taskResources << " combined with already used "
-                         << usedResources << " is greater than offered "
-                         << offer->resources();
+            LOG(WARNING) << "Task " << task.task_id() << " + executor attempted"
+                         << " to use " << taskResources << " combined with"
+                         << " already used " << usedResources << " is greater"
+                         << " than offered " << offer->resources();
 
             return TaskInfoError::some(
                 "Task + executor uses more resources than offered");
@@ -1442,7 +1450,8 @@ void Master::processTasks(Offer* offer,
       usedResources += launchTask(task, framework, slave);
     } else {
       // Error validating task, send a failed status update.
-      LOG(WARNING) << "Error validating task: " << error.get();
+      LOG(WARNING) << "Error validating task " << task.task_id()
+                   << " : " << error.get();
       StatusUpdateMessage message;
       StatusUpdate* update = message.mutable_update();
       update->mutable_framework_id()->MergeFrom(framework->id);

Modified: incubator/mesos/trunk/src/slave/flags.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/flags.hpp?rev=1364837&r1=1364836&r2=1364837&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/flags.hpp (original)
+++ incubator/mesos/trunk/src/slave/flags.hpp Mon Jul 23 23:23:40 2012
@@ -103,7 +103,7 @@ public:
   std::string work_dir;
   std::string launcher_dir;
   std::string webui_dir;
-  short webui_port;
+  uint16_t webui_port;
   std::string hadoop_home; // TODO(benh): Make an Option.
   bool switch_user;
   std::string frameworks_home;  // TODO(benh): Make an Option.

Modified: incubator/mesos/trunk/src/slave/main.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/main.cpp?rev=1364837&r1=1364836&r2=1364837&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/main.cpp (original)
+++ incubator/mesos/trunk/src/slave/main.cpp Mon Jul 23 23:23:40 2012
@@ -62,7 +62,7 @@ int main(int argc, char** argv)
   // The following flags are executable specific (e.g., since we only
   // have one instance of libprocess per execution, we only want to
   // advertise the port and ip option once, here).
-  Option<short> port;
+  Option<uint16_t> port;
   flags.add(&port, "port", "Port to listen on");
 
   Option<string> ip;



Mime
View raw message