Improve tablet status messages during startup

Currently while the tablet server is starting, all of the tablets that
are waiting in the 'tablet-open' threadpool have the status 'Tablet
initializing...'. This can be confusing to admins since it sounds like
it is stuck rather than waiting in a queue.

This amends the status messages accordingly.

Change-Id: I72337860e3c4c0a0992c3fb8578e94857529805e
Reviewed-on: http://gerrit.cloudera.org:8080/9400
Reviewed-by: Will Berkeley <wdberke...@gmail.com>
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/f92f65c4
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/f92f65c4
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/f92f65c4

Branch: refs/heads/master
Commit: f92f65c44e3e7c7815731c8aee2f1dc869ec2fbc
Parents: 15f49ed
Author: Todd Lipcon <t...@apache.org>
Authored: Thu Feb 22 11:13:44 2018 -0800
Committer: Todd Lipcon <t...@apache.org>
Committed: Thu Feb 22 21:02:25 2018 +0000

----------------------------------------------------------------------
 src/kudu/tablet/tablet_replica.cc | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/f92f65c4/src/kudu/tablet/tablet_replica.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/tablet_replica.cc 
b/src/kudu/tablet/tablet_replica.cc
index 2fbd7ae..72ad7ec 100644
--- a/src/kudu/tablet/tablet_replica.cc
+++ b/src/kudu/tablet/tablet_replica.cc
@@ -141,6 +141,7 @@ TabletReplica::~TabletReplica() {
 Status TabletReplica::Init(ThreadPool* raft_pool) {
   CHECK_EQ(NOT_INITIALIZED, state_);
   TRACE("Creating consensus instance");
+  SetStatusMessage("Initializing consensus...");
   ConsensusOptions options;
   options.tablet_id = meta_->tablet_id();
   shared_ptr<RaftConsensus> consensus;
@@ -151,6 +152,7 @@ Status TabletReplica::Init(ThreadPool* raft_pool) {
                                       &consensus));
   consensus_ = std::move(consensus);
   set_state(INITIALIZED);
+  SetStatusMessage("Initialized. Waiting to start...");
   return Status::OK();
 }
 

Reply via email to