HBASE-24696 Include JVM information on Web UI under "Software Attributes"
Closes #2087 Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
This commit is contained in:
parent
fccd03ffa2
commit
3d270ba6f9
|
@ -20,6 +20,7 @@
|
||||||
<%@ page contentType="text/html;charset=UTF-8"
|
<%@ page contentType="text/html;charset=UTF-8"
|
||||||
import="org.apache.hadoop.conf.Configuration"
|
import="org.apache.hadoop.conf.Configuration"
|
||||||
import="org.apache.hadoop.hbase.HBaseConfiguration"
|
import="org.apache.hadoop.hbase.HBaseConfiguration"
|
||||||
|
import="org.apache.hadoop.hbase.rest.model.VersionModel"
|
||||||
import="org.apache.hadoop.hbase.util.VersionInfo"
|
import="org.apache.hadoop.hbase.util.VersionInfo"
|
||||||
import="java.util.Date"%>
|
import="java.util.Date"%>
|
||||||
<%
|
<%
|
||||||
|
@ -83,6 +84,11 @@ String listenPort = conf.get("hbase.rest.port", "8080");
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>JVM Version</td>
|
||||||
|
<td><%= new VersionModel(getServletContext()).getJVMVersion() %></td>
|
||||||
|
<td>JVM vendor and version</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>HBase Version</td>
|
<td>HBase Version</td>
|
||||||
<td><%= VersionInfo.getVersion() %>, revision=<%= VersionInfo.getRevision() %></td>
|
<td><%= VersionInfo.getVersion() %>, revision=<%= VersionInfo.getRevision() %></td>
|
||||||
|
|
|
@ -299,6 +299,11 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>JVM Version</td>
|
||||||
|
<td><% JvmVersion.getVersion() %></td>
|
||||||
|
<td>JVM vendor and version</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>HBase Version</td>
|
<td>HBase Version</td>
|
||||||
<td><% org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, revision=<% org.apache.hadoop.hbase.util.VersionInfo.getRevision() %></td><td>HBase version and revision</td>
|
<td><% org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, revision=<% org.apache.hadoop.hbase.util.VersionInfo.getRevision() %></td><td>HBase version and revision</td>
|
||||||
|
|
|
@ -32,6 +32,7 @@ org.apache.hadoop.hbase.HBaseConfiguration;
|
||||||
org.apache.hadoop.hbase.io.hfile.CacheConfig;
|
org.apache.hadoop.hbase.io.hfile.CacheConfig;
|
||||||
org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
|
org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
|
||||||
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ServerInfo;
|
org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ServerInfo;
|
||||||
|
org.apache.hadoop.hbase.util.JvmVersion;
|
||||||
org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
|
org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
|
||||||
</%import>
|
</%import>
|
||||||
<%doc>If json AND bcn is NOT an empty string presume it a block cache view request.</%doc>
|
<%doc>If json AND bcn is NOT an empty string presume it a block cache view request.</%doc>
|
||||||
|
@ -165,6 +166,11 @@ org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>JVM Version</td>
|
||||||
|
<td><% JvmVersion.getVersion() %></td>
|
||||||
|
<td>JVM vendor and version</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>HBase Version</td>
|
<td>HBase Version</td>
|
||||||
<td><% org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, revision=<% org.apache.hadoop.hbase.util.VersionInfo.getRevision() %></td>
|
<td><% org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, revision=<% org.apache.hadoop.hbase.util.VersionInfo.getRevision() %></td>
|
||||||
|
|
|
@ -25,6 +25,7 @@ java.util.Map;
|
||||||
java.util.concurrent.atomic.LongAdder;
|
java.util.concurrent.atomic.LongAdder;
|
||||||
org.apache.hadoop.hbase.ServerName;
|
org.apache.hadoop.hbase.ServerName;
|
||||||
org.apache.hadoop.hbase.tool.CanaryTool.RegionStdOutSink;
|
org.apache.hadoop.hbase.tool.CanaryTool.RegionStdOutSink;
|
||||||
|
org.apache.hadoop.hbase.util.JvmVersion;
|
||||||
</%import>
|
</%import>
|
||||||
|
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
|
@ -109,6 +110,11 @@ org.apache.hadoop.hbase.tool.CanaryTool.RegionStdOutSink;
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>JVM Version</td>
|
||||||
|
<td><% JvmVersion.getVersion() %></td>
|
||||||
|
<td>JVM vendor and version</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>HBase Version</td>
|
<td>HBase Version</td>
|
||||||
<td><% org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, r<% org.apache.hadoop.hbase.util.VersionInfo.getRevision() %></td><td>HBase version and revision</td>
|
<td><% org.apache.hadoop.hbase.util.VersionInfo.getVersion() %>, r<% org.apache.hadoop.hbase.util.VersionInfo.getRevision() %></td><td>HBase version and revision</td>
|
||||||
|
|
|
@ -25,9 +25,7 @@ import org.apache.yetus.audience.InterfaceAudience;
|
||||||
import org.apache.yetus.audience.InterfaceStability;
|
import org.apache.yetus.audience.InterfaceStability;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Certain JVM versions are known to be unstable with HBase. This
|
* Utility class to get and check the current JVM version.
|
||||||
* class has a utility function to determine whether the current JVM
|
|
||||||
* is known to be unstable.
|
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
@InterfaceStability.Stable
|
@InterfaceStability.Stable
|
||||||
|
@ -38,10 +36,19 @@ public abstract class JvmVersion {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the current JVM is known to be unstable.
|
* Return true if the current JVM version is known to be unstable with HBase.
|
||||||
*/
|
*/
|
||||||
public static boolean isBadJvmVersion() {
|
public static boolean isBadJvmVersion() {
|
||||||
String version = System.getProperty("java.version");
|
String version = System.getProperty("java.version");
|
||||||
return version != null && BAD_JVM_VERSIONS.contains(version);
|
return version != null && BAD_JVM_VERSIONS.contains(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current JVM version information.
|
||||||
|
*/
|
||||||
|
public static String getVersion() {
|
||||||
|
return System.getProperty("java.vm.vendor", "UNKNOWN_VM_VENDOR") + ' ' +
|
||||||
|
System.getProperty("java.version", "UNKNOWN_JAVA_VERSION") + '-' +
|
||||||
|
System.getProperty("java.vm.version", "UNKNOWN_VM_VERSION");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
import="java.util.Date"
|
import="java.util.Date"
|
||||||
%>
|
%>
|
||||||
<%@ page import="org.apache.hadoop.hbase.thrift.ImplType" %>
|
<%@ page import="org.apache.hadoop.hbase.thrift.ImplType" %>
|
||||||
|
<%@ page import="org.apache.hadoop.hbase.util.JvmVersion" %>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
Configuration conf = (Configuration)getServletContext().getAttribute("hbase.conf");
|
Configuration conf = (Configuration)getServletContext().getAttribute("hbase.conf");
|
||||||
|
@ -99,6 +100,11 @@ String qop = conf.get("hbase.thrift.security.qop", "None");
|
||||||
<th>Value</th>
|
<th>Value</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>JVM Version</td>
|
||||||
|
<td><%= JvmVersion.getVersion() %></td>
|
||||||
|
<td>JVM vendor and version information</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>HBase Version</td>
|
<td>HBase Version</td>
|
||||||
<td><%= VersionInfo.getVersion() %>, r<%= VersionInfo.getRevision() %></td>
|
<td><%= VersionInfo.getVersion() %>, r<%= VersionInfo.getRevision() %></td>
|
||||||
|
|
Loading…
Reference in New Issue