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 2012/12/07 01:46:34 UTC

svn commit: r1418151 - in /incubator/mesos/trunk/src: exec/exec.cpp master/hierarchical_allocator_process.hpp master/master.cpp master/master.hpp sched/sched.cpp slave/gc.cpp slave/slave.cpp

Author: benh
Date: Fri Dec  7 00:46:32 2012
New Revision: 1418151

URL: http://svn.apache.org/viewvc?rev=1418151&view=rev
Log:
Reduced noise in logs.

From: Vinod Kone <vi...@gmail.com>
Review: https://reviews.apache.org/r/8024

Modified:
    incubator/mesos/trunk/src/exec/exec.cpp
    incubator/mesos/trunk/src/master/hierarchical_allocator_process.hpp
    incubator/mesos/trunk/src/master/master.cpp
    incubator/mesos/trunk/src/master/master.hpp
    incubator/mesos/trunk/src/sched/sched.cpp
    incubator/mesos/trunk/src/slave/gc.cpp
    incubator/mesos/trunk/src/slave/slave.cpp

Modified: incubator/mesos/trunk/src/exec/exec.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/exec/exec.cpp?rev=1418151&r1=1418150&r2=1418151&view=diff
==============================================================================
--- incubator/mesos/trunk/src/exec/exec.cpp (original)
+++ incubator/mesos/trunk/src/exec/exec.cpp Fri Dec  7 00:46:32 2012
@@ -60,7 +60,7 @@ class ShutdownProcess : public Process<S
 protected:
   virtual void initialize()
   {
-    LOG(INFO) << "Scheduling shutdown of the executor";
+    VLOG(1) << "Scheduling shutdown of the executor";
     // TODO(benh): Pass the shutdown timeout with ExecutorRegistered
     // since it might have gotten configured on the command line.
     delay(slave::EXECUTOR_SHUTDOWN_GRACE_PERIOD, self(), &Self::kill);
@@ -68,7 +68,7 @@ protected:
 
   void kill()
   {
-    LOG(INFO) << "Committing suicide by killing the process group";
+    VLOG(1) << "Committing suicide by killing the process group";
 
     // TODO(vinod): Invoke killtree without killing ourselves.
     // Kill the process group (including ourself).

Modified: incubator/mesos/trunk/src/master/hierarchical_allocator_process.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/hierarchical_allocator_process.hpp?rev=1418151&r1=1418150&r2=1418151&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/hierarchical_allocator_process.hpp (original)
+++ incubator/mesos/trunk/src/master/hierarchical_allocator_process.hpp Fri Dec  7 00:46:32 2012
@@ -539,9 +539,10 @@ HierarchicalAllocatorProcess<UserSorter,
   if (allocatable.contains(slaveId)) {
     allocatable[slaveId] += resources;
 
-    VLOG(1) << "Recovered " << resources.allocatable()
-            << " on slave " << slaveId
-            << " from framework " << frameworkId;
+    LOG(INFO) << "Recovered " << resources.allocatable()
+              << " (total allocatable: " << allocatable[slaveId] << ")"
+              << " on slave " << slaveId
+              << " from framework " << frameworkId;
   }
 }
 

Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1418151&r1=1418150&r2=1418151&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Fri Dec  7 00:46:32 2012
@@ -528,7 +528,7 @@ void Master::fileAttached(const Future<N
 {
   CHECK(!result.isDiscarded());
   if (result.isReady()) {
-    VLOG(1) << "Successfully attached file '" << path << "'";
+    LOG(INFO) << "Successfully attached file '" << path << "'";
   } else {
     LOG(ERROR) << "Failed to attach file '" << path << "': "
                << result.failure();
@@ -1460,10 +1460,10 @@ void Master::processTasks(Offer* offer,
                           const vector<TaskInfo>& tasks,
                           const Filters& filters)
 {
-  VLOG(1) << "Processing reply for offer " << offer->id()
-          << " on slave " << slave->id
-          << " (" << slave->info.hostname() << ")"
-          << " for framework " << framework->id;
+  LOG(INFO) << "Processing reply for offer " << offer->id()
+            << " on slave " << slave->id
+            << " (" << slave->info.hostname() << ")"
+            << " for framework " << framework->id;
 
   Resources usedResources; // Accumulated resources used from this offer.
 

Modified: incubator/mesos/trunk/src/master/master.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.hpp?rev=1418151&r1=1418150&r2=1418151&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.hpp (original)
+++ incubator/mesos/trunk/src/master/master.hpp Fri Dec  7 00:46:32 2012
@@ -282,8 +282,8 @@ struct Slave
       std::make_pair(task->framework_id(), task->task_id());
     CHECK(tasks.count(key) == 0);
     tasks[key] = task;
-    VLOG(1) << "Adding task with resources " << task->resources()
-            << " on slave " << id;
+    LOG(INFO) << "Adding task with resources " << task->resources()
+              << " on slave " << id;
     resourcesInUse += task->resources();
   }
 
@@ -293,8 +293,8 @@ struct Slave
       std::make_pair(task->framework_id(), task->task_id());
     CHECK(tasks.count(key) > 0);
     tasks.erase(key);
-    VLOG(1) << "Removing task with resources " << task->resources()
-            << " on slave " << id;
+    LOG(INFO) << "Removing task with resources " << task->resources()
+              << " on slave " << id;
     resourcesInUse -= task->resources();
   }
 
@@ -302,8 +302,8 @@ struct Slave
   {
     CHECK(!offers.contains(offer));
     offers.insert(offer);
-    VLOG(1) << "Adding offer with resources " << offer->resources()
-            << " on slave " << id;
+    LOG(INFO) << "Adding offer with resources " << offer->resources()
+              << " on slave " << id;
     resourcesOffered += offer->resources();
   }
 
@@ -311,8 +311,8 @@ struct Slave
   {
     CHECK(offers.contains(offer));
     offers.erase(offer);
-    VLOG(1) << "Removing offer with resources " << offer->resources()
-            << " on slave " << id;
+    LOG(INFO) << "Removing offer with resources " << offer->resources()
+              << " on slave " << id;
     resourcesOffered -= offer->resources();
   }
 
@@ -347,17 +347,6 @@ struct Slave
     }
   }
 
-  Resources resourcesFree()
-  {
-    Resources resources = info.resources() - (resourcesOffered + resourcesInUse);
-    VLOG(1) << "Calculating resources free on slave " << id << std::endl
-            << "    Resources: " << info.resources() << std::endl
-            << "    Resources Offered: " << resourcesOffered << std::endl
-            << "    Resources In Use: " << resourcesInUse << std::endl
-            << "    Resources Free: " << resources << std::endl;
-    return resources;
-  }
-
   const SlaveID id;
   const SlaveInfo info;
 

Modified: incubator/mesos/trunk/src/sched/sched.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/sched/sched.cpp?rev=1418151&r1=1418150&r2=1418151&view=diff
==============================================================================
--- incubator/mesos/trunk/src/sched/sched.cpp (original)
+++ incubator/mesos/trunk/src/sched/sched.cpp Fri Dec  7 00:46:32 2012
@@ -604,7 +604,7 @@ protected:
       send(slave, message);
     } else {
       VLOG(1) << "Cannot send directly to slave " << slaveId
-	      << "; sending through master";
+              << "; sending through master";
 
       FrameworkToExecutorMessage message;
       message.mutable_slave_id()->MergeFrom(slaveId);

Modified: incubator/mesos/trunk/src/slave/gc.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/gc.cpp?rev=1418151&r1=1418150&r2=1418151&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/gc.cpp (original)
+++ incubator/mesos/trunk/src/slave/gc.cpp Fri Dec  7 00:46:32 2012
@@ -120,10 +120,8 @@ void GarbageCollectorProcess::reset()
   Timer::cancel(timer); // Cancel the existing timer, if any.
   if (!paths.empty()) {
     Timeout removalTime = (*paths.begin()).first; // Get the first entry.
-    Duration d = removalTime.remaining();
 
-    VLOG(1) << "Scheduling GC removal event to fire after " << d;
-    timer = delay(d, self(), &Self::remove, removalTime);
+    timer = delay(removalTime.remaining(), self(), &Self::remove, removalTime);
   } else {
     timer = Timer(); // Reset the timer.
   }
@@ -144,7 +142,7 @@ void GarbageCollectorProcess::remove(con
         LOG(WARNING) << "Failed to delete " << path << ": " << result.error();
         promise->fail(result.error());
       } else {
-        VLOG(1) << "Deleted " << path;
+        LOG(INFO) << "Deleted " << path;
         promise->set(result.get());
       }
       delete promise;

Modified: incubator/mesos/trunk/src/slave/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.cpp?rev=1418151&r1=1418150&r2=1418151&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.cpp (original)
+++ incubator/mesos/trunk/src/slave/slave.cpp Fri Dec  7 00:46:32 2012
@@ -355,7 +355,7 @@ void Slave::fileAttached(const Future<No
 {
   CHECK(!result.isDiscarded());
   if (result.isReady()) {
-    VLOG(1) << "Successfully attached file '" << path << "'";
+    LOG(INFO) << "Successfully attached file '" << path << "'";
   } else {
     LOG(ERROR) << "Failed to attach file '" << path << "': "
                << result.failure();
@@ -1149,8 +1149,6 @@ Duration Slave::age(double usage)
 
 void Slave::checkDiskUsage()
 {
-  VLOG(1) << "Checking disk usage";
-
   // TODO(vinod): We are making usage a Future, so that we can plug in
   // os::usage() into async.
   Future<Try<double> >(os::usage())