HBASE-18520 Add jmx value to determine true Master Start time

This is to determine how long it took in total for the master to start and finish initializing.

Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
Zach York 2017-06-15 17:10:07 -07:00 committed by Michael Stack
parent c41ea638d8
commit 1ba949e030
1 changed files with 2 additions and 1 deletions

View File

@ -894,7 +894,8 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
} }
status.markComplete("Initialization successful"); status.markComplete("Initialization successful");
LOG.info("Master has completed initialization"); LOG.info(String.format("Master has completed initialization %.3fsec",
(System.currentTimeMillis() - masterActiveTime) / 1000.0f));
this.masterFinishedInitializationTime = System.currentTimeMillis(); this.masterFinishedInitializationTime = System.currentTimeMillis();
configurationManager.registerObserver(this.balancer); configurationManager.registerObserver(this.balancer);