HBASE-18520 Add jmx value to determine true Master Start time; amendment
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:
parent
b5a24b6696
commit
036fce3cf8
|
@ -122,6 +122,9 @@ public interface MetricsMasterWrapper {
|
|||
*/
|
||||
long getMergePlanCount();
|
||||
|
||||
/**
|
||||
* Get the time in Millis when the master finished initializing/becoming the active master
|
||||
*/
|
||||
/**
|
||||
* Get the time in Millis when the master finished initializing/becoming the active master
|
||||
*/
|
||||
|
|
|
@ -894,7 +894,8 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
|
|||
}
|
||||
|
||||
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();
|
||||
configurationManager.registerObserver(this.balancer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue