sunhelly commented on code in PR #4788:
URL: https://github.com/apache/hbase/pull/4788#discussion_r1096889693


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java:
##########
@@ -2399,14 +2405,19 @@ private void startActiveMasterManager(int infoPort) 
throws KeeperException {
         Threads.sleep(timeout);
       }
     }
-    MonitoredTask status = TaskMonitor.get().createStatus("Master startup");
-    status.setDescription("Master startup");
+
+    // Here for the master startup process, we use TaskGroup to monitor the 
whole progress.
+    // The UI is similar to how Hadoop designed the startup page for the 
NameNode.
+    // See HBASE-21521 for more details.
+    boolean ignoreClearStartupStatus =
+      conf.getBoolean("hbase.master.ignore.clear.startup.status", true);
+    startupTaskGroup = TaskGroup.createTaskGroup(ignoreClearStartupStatus, 
"Master startup");
     try {
-      if (activeMasterManager.blockUntilBecomingActiveMaster(timeout, status)) 
{
-        finishActiveMasterInitialization(status);
+      if (activeMasterManager.blockUntilBecomingActiveMaster(timeout, 
startupTaskGroup)) {
+        finishActiveMasterInitialization(startupTaskGroup);
       }
     } catch (Throwable t) {
-      status.setStatus("Failed to become active: " + t.getMessage());

Review Comment:
   I think we can use `status.abort(...)` here instead, this info may display 
in a shot moment, since master will abort soon afterwards.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to