Remove/downgrade a few very verbose useless log statements

When running tests that use a tablet server the log is
full of thread/reactor/maintenance manager statetments
that are useless. This is particularly annoying at VLOG(5)
level where we expect to see printouts of compaction
inputs/outputs. These get lost in a sea of useless statements.

This outright removes the "timer tick" reactor statement,
downgrades another reactor statement to VLOG(10) and makes the
maintenance_manager much quieter when it's disabled.

Change-Id: I7863f067f49cc7432e8ca3b532a208d3c4005300
Reviewed-on: http://gerrit.cloudera.org:8080/5226
Reviewed-by: Todd Lipcon <[email protected]>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 4cc48d887f690ab79feda69cf0986d8608067499
Parents: f024772
Author: David Alves <[email protected]>
Authored: Thu Nov 24 12:47:53 2016 -0800
Committer: David Ribeiro Alves <[email protected]>
Committed: Mon Nov 28 20:28:50 2016 +0000

----------------------------------------------------------------------
 src/kudu/rpc/reactor.cc              |  5 ++---
 src/kudu/util/maintenance_manager.cc | 10 ++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/4cc48d88/src/kudu/rpc/reactor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/reactor.cc b/src/kudu/rpc/reactor.cc
index e30a8b5..115afb4 100644
--- a/src/kudu/rpc/reactor.cc
+++ b/src/kudu/rpc/reactor.cc
@@ -250,7 +250,6 @@ void ReactorThread::TimerHandler(ev::timer &watcher, int 
revents) {
     return;
   }
   MonoTime now(MonoTime::Now());
-  VLOG(4) << name() << ": timer tick at " << now.ToString();
   cur_time_ = now;
 
   ScanIdleConnections();
@@ -269,8 +268,8 @@ void ReactorThread::ScanIdleConnections() {
   for (; c != c_end; ) {
     const scoped_refptr<Connection>& conn = *c;
     if (!conn->Idle()) {
-      VLOG(3) << "Connection " << conn->ToString() << " not idle";
-      ++c; // TODO: clean up this loop
+      VLOG(10) << "Connection " << conn->ToString() << " not idle";
+      ++c; // TODO(todd): clean up this loop
       continue;
     }
 

http://git-wip-us.apache.org/repos/asf/kudu/blob/4cc48d88/src/kudu/util/maintenance_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/maintenance_manager.cc 
b/src/kudu/util/maintenance_manager.cc
index 973849a..6a50f6f 100644
--- a/src/kudu/util/maintenance_manager.cc
+++ b/src/kudu/util/maintenance_manager.cc
@@ -28,6 +28,7 @@
 #include "kudu/util/debug/trace_event.h"
 #include "kudu/util/debug/trace_logging.h"
 #include "kudu/util/flag_tags.h"
+#include "kudu/util/logging.h"
 #include "kudu/util/mem_tracker.h"
 #include "kudu/util/metrics.h"
 #include "kudu/util/stopwatch.h"
@@ -204,6 +205,11 @@ void MaintenanceManager::RunSchedulerThread() {
       return;
     }
 
+    if (!FLAGS_enable_maintenance_manager) {
+      KLOG_EVERY_N_SECS(INFO, 30) << "Maintenance manager is disabled. Doing 
nothing";
+      return;
+    }
+
     // Find the best op.
     MaintenanceOp* op = FindBestOp();
     if (!op) {
@@ -255,10 +261,6 @@ void MaintenanceManager::RunSchedulerThread() {
 MaintenanceOp* MaintenanceManager::FindBestOp() {
   TRACE_EVENT0("maintenance", "MaintenanceManager::FindBestOp");
 
-  if (!FLAGS_enable_maintenance_manager) {
-    VLOG_AND_TRACE("maintenance", 1) << "Maintenance manager is disabled. 
Doing nothing";
-    return nullptr;
-  }
   size_t free_threads = num_threads_ - running_ops_;
   if (free_threads == 0) {
     VLOG_AND_TRACE("maintenance", 1) << "there are no free threads, so we 
can't run anything.";

Reply via email to