hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-18520 Add jmx value to determine true Master Start time; amendment
Date Tue, 08 Aug 2017 07:57:23 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 b5a24b669 -> 036fce3cf


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>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/036fce3c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/036fce3c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/036fce3c

Branch: refs/heads/branch-1
Commit: 036fce3cf82fee3c621b585ac42d826741a0be9e
Parents: b5a24b6
Author: Zach York <zyork@amazon.com>
Authored: Thu Jun 15 17:10:07 2017 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Tue Aug 8 15:56:56 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/master/MetricsMasterWrapper.java | 3 +++
 .../src/main/java/org/apache/hadoop/hbase/master/HMaster.java     | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/036fce3c/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapper.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapper.java
b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapper.java
index 812cad9..6938e87 100644
--- a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapper.java
+++ b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapper.java
@@ -125,5 +125,8 @@ public interface MetricsMasterWrapper {
   /**
    * 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
+   */
   long getMasterInitializationTime();
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/036fce3c/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 950ea4a..5b1aed6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -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);
 


Mime
View raw message