kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpe...@apache.org
Subject [1/2] kudu git commit: [tools] ksck: fix some output spacing and printing of GetFlags warnings
Date Mon, 11 Jun 2018 19:29:05 GMT
Repository: kudu
Updated Branches:
  refs/heads/master a9a54ec94 -> 382ee1206


[tools] ksck: fix some output spacing and printing of GetFlags warnings

The result of the call to GetFlags was not being saved, resulting
in a different warning being printed than the reason GetFlags failed,
when it did fail. The different warning was usually from a successful
previous RPC and so was, pretty confusingly, a blank line.

Change-Id: I5a7772a2d25d934ce42b27fbb81a5711cb4f12cd
Reviewed-on: http://gerrit.cloudera.org:8080/10667
Tested-by: Will Berkeley <wdberkeley@gmail.com>
Reviewed-by: Will Berkeley <wdberkeley@gmail.com>


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

Branch: refs/heads/master
Commit: 112a60f37e07a96e1ab11c224dc6d58a9dc1cf76
Parents: a9a54ec
Author: Will Berkeley <wdberkeley@apache.org>
Authored: Fri Jun 8 13:48:29 2018 -0700
Committer: Will Berkeley <wdberkeley@gmail.com>
Committed: Mon Jun 11 17:56:43 2018 +0000

----------------------------------------------------------------------
 src/kudu/tools/ksck.cc         | 6 ++++--
 src/kudu/tools/ksck_results.cc | 5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/112a60f3/src/kudu/tools/ksck.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/ksck.cc b/src/kudu/tools/ksck.cc
index 7f5538b..c895059 100644
--- a/src/kudu/tools/ksck.cc
+++ b/src/kudu/tools/ksck.cc
@@ -219,7 +219,8 @@ Status Ksck::CheckMasterHealth() {
 
     // Fetch the flags information.
     // Failing to gather flags is only a warning.
-    if (!master->FetchUnusualFlags().ok()) {
+    s = master->FetchUnusualFlags();
+    if (!s.ok()) {
       results_.warning_messages.push_back(s.CloneAndPrepend(Substitute(
           "unable to get flag information for master $0 ($1)",
           master->uuid(),
@@ -389,7 +390,8 @@ Status Ksck::FetchInfoFromTabletServers() {
 
           // Fetch the flags information.
           // Failing to gather flags is only a warning.
-          if (!ts->FetchUnusualFlags().ok()) {
+          s = ts->FetchUnusualFlags();
+          if (!s.ok()) {
             results_.warning_messages.push_back(s.CloneAndPrepend(Substitute(
                     "unable to get flag information for tablet server $0 ($1)",
                     ts->uuid(),

http://git-wip-us.apache.org/repos/asf/kudu/blob/112a60f3/src/kudu/tools/ksck_results.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tools/ksck_results.cc b/src/kudu/tools/ksck_results.cc
index 528928f..ca42674 100644
--- a/src/kudu/tools/ksck_results.cc
+++ b/src/kudu/tools/ksck_results.cc
@@ -276,9 +276,13 @@ Status KsckResults::PrintTo(PrintMode mode, ostream& out) {
 
   // Next, report on checksum scans.
   RETURN_NOT_OK(PrintChecksumResults(checksum_results, out));
+  if (!checksum_results.tables.empty()) {
+    out << endl;
+  }
 
   // And, add a summary of all the things we checked.
   RETURN_NOT_OK(PrintTotalCounts(*this, out));
+  out << endl;
 
   // Penultimately, print the warnings.
   if (!warning_messages.empty()) {
@@ -528,7 +532,6 @@ Status PrintChecksumResults(const KsckChecksumResults& checksum_results,
       }
     }
   }
-  out << endl;
   return Status::OK();
 }
 


Mime
View raw message