You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2010/04/14 06:15:23 UTC
svn commit: r933853 - in /hadoop/hbase/branches/0.20_pre_durability:
CHANGES.txt src/java/org/apache/hadoop/hbase/util/JvmVersion.java
src/webapps/master/master.jsp src/webapps/static/hbase.css
Author: stack
Date: Wed Apr 14 04:15:22 2010
New Revision: 933853
URL: http://svn.apache.org/viewvc?rev=933853&view=rev
Log:
HBASE-2440 Master UI should check against known bad JDK versions and warn the user
Added:
hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/util/JvmVersion.java
Modified:
hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt
hadoop/hbase/branches/0.20_pre_durability/src/webapps/master/master.jsp
hadoop/hbase/branches/0.20_pre_durability/src/webapps/static/hbase.css
Modified: hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt?rev=933853&r1=933852&r2=933853&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt Wed Apr 14 04:15:22 2010
@@ -68,6 +68,8 @@ Release 0.20.4 - Unreleased
HBASE-2423 Update 'Getting Started' for 0.20.4 including making
"important configurations more visiable"
HBASE-2412 [stargate] PerformanceEvaluation
+ HBASE-2440 Master UI should check against known bad JDK versions and warn
+ the use (Todd Lipcon via Stack)
NEW FEATURES
HBASE-2257 [stargate] multiuser mode
Added: hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/util/JvmVersion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/util/JvmVersion.java?rev=933853&view=auto
==============================================================================
--- hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/util/JvmVersion.java (added)
+++ hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/util/JvmVersion.java Wed Apr 14 04:15:22 2010
@@ -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);
+ }
+}
Modified: hadoop/hbase/branches/0.20_pre_durability/src/webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20_pre_durability/src/webapps/master/master.jsp?rev=933853&r1=933852&r2=933853&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20_pre_durability/src/webapps/master/master.jsp (original)
+++ hadoop/hbase/branches/0.20_pre_durability/src/webapps/master/master.jsp Wed Apr 14 04:15:22 2010
@@ -3,6 +3,7 @@
import="java.net.URLEncoder"
import="org.apache.hadoop.io.Text"
import="org.apache.hadoop.hbase.util.Bytes"
+ import="org.apache.hadoop.hbase.util.JvmVersion"
import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.HConstants"
import="org.apache.hadoop.hbase.master.MetaRegion"
@@ -32,10 +33,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>
Modified: hadoop/hbase/branches/0.20_pre_durability/src/webapps/static/hbase.css
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20_pre_durability/src/webapps/static/hbase.css?rev=933853&r1=933852&r2=933853&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20_pre_durability/src/webapps/static/hbase.css (original)
+++ hadoop/hbase/branches/0.20_pre_durability/src/webapps/static/hbase.css Wed Apr 14 04:15:22 2010
@@ -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;
+}