HBASE-2440 Master UI should check against known bad JDK versions and warn the user

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@933858 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-04-14 04:38:18 +00:00
parent 469b8a888b
commit 5f5e0e0575
4 changed files with 62 additions and 1 deletions

View File

@ -501,6 +501,8 @@ Release 0.21.0 - Unreleased
(Kay Kay via Stack)
HBASE-1933 Upload Hbase jars to a public maven repository
(Kay Kay via Stack)
HBASE-2440 Master UI should check against known bad JDK versions and
warn the user (Todd Lipcon via Stack)
NEW FEATURES
HBASE-1961 HBase EC2 scripts

View File

@ -0,0 +1,43 @@
/**
* Copyright 2007 The Apache Software Foundation
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.util;
import java.util.HashSet;
import java.util.Set;
/**
* Certain JVM versions are known to be unstable with HBase. This
* class has a utility function to determine whether the current JVM
* is known to be unstable.
*/
public abstract class JvmVersion {
private static Set<String> BAD_JVM_VERSIONS = new HashSet<String>();
static {
BAD_JVM_VERSIONS.add("1.6.0_18");
}
/**
* Return true if the current JVM is known to be unstable.
*/
public static boolean isBadJvmVersion() {
String version = System.getProperty("java.version");
return version != null && BAD_JVM_VERSIONS.contains(version);
}
}

View File

@ -35,10 +35,19 @@
<link rel="stylesheet" type="text/css" href="/static/hbase.css" />
</head>
<body>
<a id="logo" href="http://wiki.apache.org/lucene-hadoop/Hbase"><img src="/static/hbase_logo_med.gif" alt="HBase Logo" title="HBase Logo" /></a>
<h1 id="page_title">Master: <%=master.getMasterAddress().getHostname()%>:<%=master.getMasterAddress().getPort()%></h1>
<p id="links_menu"><a href="/logs/">Local logs</a>, <a href="/stacks">Thread Dump</a>, <a href="/logLevel">Log Level</a></p>
<% if (JvmVersion.isBadJvmVersion()) { %>
<div class="warning">
Your current JVM version <%= System.getProperty("java.version") %> is known to be
unstable with HBase. Please see the
<a href="http://wiki.apache.org/hadoop/Hbase/Troubleshooting#A18">HBase wiki</a>
for details.
</div>
<% } %>
<hr id="head_rule" />
<h2>Master Attributes</h2>

View File

@ -6,3 +6,10 @@ th { border: thin solid DodgerBlue }
#logo {float: left;}
#logo img {border: none;}
#page_title {padding-top: 27px;}
div.warning {
border: 1px solid #666;
background-color: #fcc;
font-size: 110%;
font-weight: bold;
}