You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2014/02/13 23:53:46 UTC

[3/3] git commit: Updated logging levels for scheduler and executor drivers.

Updated logging levels for scheduler and executor drivers.

Review: https://reviews.apache.org/r/17964


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f0fe3e1b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f0fe3e1b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f0fe3e1b

Branch: refs/heads/master
Commit: f0fe3e1bfc0257608e42bd59e1d01f40b38addaf
Parents: 6eb9c50
Author: Vinod Kone <vi...@gmail.com>
Authored: Thu Feb 13 14:44:21 2014 -0800
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Feb 13 14:44:21 2014 -0800

----------------------------------------------------------------------
 src/exec/exec.cpp   | 26 +++++++++++++-------------
 src/sched/sched.cpp | 41 ++++++++++++++++++++++-------------------
 2 files changed, 35 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f0fe3e1b/src/exec/exec.cpp
----------------------------------------------------------------------
diff --git a/src/exec/exec.cpp b/src/exec/exec.cpp
index 6c5c483..0ab5cc2 100644
--- a/src/exec/exec.cpp
+++ b/src/exec/exec.cpp
@@ -202,7 +202,7 @@ protected:
       return;
     }
 
-    VLOG(1) << "Executor registered on slave " << slaveId;
+    LOG(INFO) << "Executor registered on slave " << slaveId;
 
     connected = true;
     connection = UUID::random();
@@ -225,7 +225,7 @@ protected:
       return;
     }
 
-    VLOG(1) << "Executor re-registered on slave " << slaveId;
+    LOG(INFO) << "Executor re-registered on slave " << slaveId;
 
     connected = true;
     connection = UUID::random();
@@ -248,7 +248,7 @@ protected:
       return;
     }
 
-    VLOG(1) << "Received reconnect request from slave " << slaveId;
+    LOG(INFO) << "Received reconnect request from slave " << slaveId;
 
     // Update the slave link.
     slave = from;
@@ -375,7 +375,7 @@ protected:
       return;
     }
 
-    VLOG(1) << "Executor asked to shutdown";
+    LOG(INFO) << "Executor asked to shutdown";
 
     if (!local) {
       // Start the Shutdown Process.
@@ -409,7 +409,7 @@ protected:
 
   void abort()
   {
-    VLOG(1) << "De-activating the executor libprocess";
+    LOG(INFO) << "Deactivating the executor libprocess";
     CHECK(aborted);
 
     Lock lock(mutex);
@@ -427,8 +427,8 @@ protected:
     // not been any subsequent re-registrations with the slave in the
     // interim.
     if (connection == _connection) {
-      VLOG(1) << "Recovery timeout of " << recoveryTimeout << " exceeded; "
-              << "Shutting down";
+      LOG(INFO) << "Recovery timeout of " << recoveryTimeout << " exceeded; "
+                << "Shutting down";
       shutdown();
     }
   }
@@ -446,16 +446,16 @@ protected:
     if (checkpoint && connected) {
       connected = false;
 
-      VLOG(1) << "Slave exited, but framework has checkpointing enabled. "
-              << "Waiting " << recoveryTimeout << " to reconnect with slave "
-              << slaveId;
+      LOG(INFO) << "Slave exited, but framework has checkpointing enabled. "
+                << "Waiting " << recoveryTimeout << " to reconnect with slave "
+                << slaveId;
 
       delay(recoveryTimeout, self(), &Self::_recoveryTimeout, connection);
 
       return;
     }
 
-    VLOG(1) << "Slave exited ... shutting down";
+    LOG(INFO) << "Slave exited ... shutting down";
 
     connected = false;
 
@@ -489,8 +489,8 @@ protected:
   void sendStatusUpdate(const TaskStatus& status)
   {
     if (status.state() == TASK_STAGING) {
-      VLOG(1) << "Executor is not allowed to send "
-              << "TASK_STAGING status update. Aborting!";
+      LOG(ERROR) << "Executor is not allowed to send "
+                 << "TASK_STAGING status update. Aborting!";
 
       driver->abort();
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f0fe3e1b/src/sched/sched.cpp
----------------------------------------------------------------------
diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp
index 153d4fe..dcb3158 100644
--- a/src/sched/sched.cpp
+++ b/src/sched/sched.cpp
@@ -214,7 +214,7 @@ protected:
     connected = false;
 
     if (master.isSome()) {
-      VLOG(1) << "New master detected at " << master.get();
+      LOG(INFO) << "New master detected at " << master.get();
       link(master.get());
 
       if (credential.isSome()) {
@@ -230,11 +230,10 @@ protected:
     } else {
       // In this case, we don't actually invoke Scheduler::error
       // since we might get reconnected to a master imminently.
-      VLOG(1) << "No master detected";
+      LOG(INFO) << "No master detected";
     }
 
     // Keep detecting masters.
-    LOG(INFO) << "Detecting new master";
     detector->detect(_master.get())
       .onAny(defer(self(), &SchedulerProcess::detected, lambda::_1));
   }
@@ -320,7 +319,7 @@ protected:
     }
 
     if (reauthenticate || !future.isReady()) {
-      LOG(WARNING)
+      LOG(INFO)
         << "Failed to authenticate with master " << master.get() << ": "
         << (reauthenticate ? "master changed" :
            (future.isFailed() ? future.failure() : "future discarded"));
@@ -382,13 +381,14 @@ protected:
     }
 
     if (master != from) {
-      VLOG(1) << "Ignoring framework registered message because it was sent "
-              << "from '" << from << "' instead of the leading master '"
-              << (master.isSome() ? master.get() : UPID()) << "'";
+      LOG(WARNING)
+        << "Ignoring framework registered message because it was sent "
+        << "from '" << from << "' instead of the leading master '"
+        << (master.isSome() ? master.get() : UPID()) << "'";
       return;
     }
 
-    VLOG(1) << "Framework registered with " << frameworkId;
+    LOG(INFO) << "Framework registered with " << frameworkId;
 
     framework.mutable_id()->MergeFrom(frameworkId);
 
@@ -423,13 +423,14 @@ protected:
     }
 
     if (master != from) {
-      VLOG(1) << "Ignoring framework re-registered message because it was sent "
-              << "from '" << from << "' instead of the leading master '"
-              << (master.isSome() ? master.get() : UPID()) << "'";
+      LOG(WARNING)
+        << "Ignoring framework re-registered message because it was sent "
+        << "from '" << from << "' instead of the leading master '"
+        << (master.isSome() ? master.get() : UPID()) << "'";
       return;
     }
 
-    VLOG(1) << "Framework re-registered with " << frameworkId;
+    LOG(INFO) << "Framework re-registered with " << frameworkId;
 
     CHECK(framework.id() == frameworkId);
 
@@ -456,6 +457,8 @@ protected:
       return;
     }
 
+    VLOG(1) << "Sending registration request to " << master.get();
+
     if (!framework.has_id() || framework.id() == "") {
       // Touched for the very first time.
       RegisterFrameworkMessage message;
@@ -708,7 +711,7 @@ protected:
       return;
     }
 
-    VLOG(1) << "Got error '" << message << "'";
+    LOG(INFO) << "Got error '" << message << "'";
 
     driver->abort();
 
@@ -724,7 +727,7 @@ protected:
 
   void stop(bool failover)
   {
-    VLOG(1) << "Stopping framework '" << framework.id() << "'";
+    LOG(INFO) << "Stopping framework '" << framework.id() << "'";
 
     // Whether or not we send an unregister message, we want to
     // terminate this process.
@@ -749,7 +752,7 @@ protected:
   // SchedulerProcess::stop.
   void abort()
   {
-    VLOG(1) << "Aborting framework '" << framework.id() << "'";
+    LOG(INFO) << "Aborting framework '" << framework.id() << "'";
 
     CHECK(aborted);
 
@@ -891,12 +894,12 @@ protected:
             savedSlavePids[task.slave_id()] =
               savedOffers[offerId][task.slave_id()];
           } else {
-            VLOG(1) << "Attempting to launch task " << task.task_id()
-                    << " with the wrong slave id " << task.slave_id();
+            LOG(WARNING) << "Attempting to launch task " << task.task_id()
+                         << " with the wrong slave id " << task.slave_id();
           }
         } else {
-          VLOG(1) << "Attempting to launch task " << task.task_id()
-                  << " with an unknown offer " << offerId;
+          LOG(WARNING) << "Attempting to launch task " << task.task_id()
+                       << " with an unknown offer " << offerId;
         }
 
         // Remove the offer since we saved all the PIDs we might use.