From 3d270ba6f98dd1e9fad7f4b3c2733e9d1d75e815 Mon Sep 17 00:00:00 2001 From: Mingliang Liu Date: Tue, 21 Jul 2020 16:49:04 +0530 Subject: [PATCH] HBASE-24696 Include JVM information on Web UI under "Software Attributes" Closes #2087 Signed-off-by: Viraj Jasani Signed-off-by: Nick Dimiduk --- .../main/resources/hbase-webapps/rest/rest.jsp | 6 ++++++ .../hbase/tmpl/master/MasterStatusTmpl.jamon | 5 +++++ .../hbase/tmpl/regionserver/RSStatusTmpl.jamon | 6 ++++++ .../hadoop/hbase/tmpl/tool/CanaryStatusTmpl.jamon | 6 ++++++ .../org/apache/hadoop/hbase/util/JvmVersion.java | 15 +++++++++++---- .../resources/hbase-webapps/thrift/thrift.jsp | 6 ++++++ 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp b/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp index ed4e9c28413..3deb2bbc735 100644 --- a/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp +++ b/hbase-rest/src/main/resources/hbase-webapps/rest/rest.jsp @@ -20,6 +20,7 @@ <%@ page contentType="text/html;charset=UTF-8" import="org.apache.hadoop.conf.Configuration" import="org.apache.hadoop.hbase.HBaseConfiguration" + import="org.apache.hadoop.hbase.rest.model.VersionModel" import="org.apache.hadoop.hbase.util.VersionInfo" import="java.util.Date"%> <% @@ -83,6 +84,11 @@ String listenPort = conf.get("hbase.rest.port", "8080"); Value Description + + JVM Version + <%= new VersionModel(getServletContext()).getJVMVersion() %> + JVM vendor and version + HBase Version <%= VersionInfo.getVersion() %>, revision=<%= VersionInfo.getRevision() %> diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon index 31c6ebfaa90..cdc216828c8 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon @@ -299,6 +299,11 @@ AssignmentManager assignmentManager = master.getAssignmentManager(); Value Description + + JVM Version + <% JvmVersion.getVersion() %> + JVM vendor and version + HBase Version <% org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, revision=<% org.apache.hadoop.hbase.util.VersionInfo.getRevision() %>HBase version and revision diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon index b21a9c34944..388357d6eb0 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon @@ -32,6 +32,7 @@ org.apache.hadoop.hbase.HBaseConfiguration; org.apache.hadoop.hbase.io.hfile.CacheConfig; org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ServerInfo; +org.apache.hadoop.hbase.util.JvmVersion; org.apache.hadoop.hbase.zookeeper.MasterAddressTracker; <%doc>If json AND bcn is NOT an empty string presume it a block cache view request. @@ -165,6 +166,11 @@ org.apache.hadoop.hbase.zookeeper.MasterAddressTracker; Value Description + + JVM Version + <% JvmVersion.getVersion() %> + JVM vendor and version + HBase Version <% org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, revision=<% org.apache.hadoop.hbase.util.VersionInfo.getRevision() %> diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/tool/CanaryStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/tool/CanaryStatusTmpl.jamon index e2d29eef280..9536b8d0dd3 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/tool/CanaryStatusTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/tool/CanaryStatusTmpl.jamon @@ -25,6 +25,7 @@ java.util.Map; java.util.concurrent.atomic.LongAdder; org.apache.hadoop.hbase.ServerName; org.apache.hadoop.hbase.tool.CanaryTool.RegionStdOutSink; +org.apache.hadoop.hbase.util.JvmVersion;