hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r933856 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/java/org/apache/hadoop/hbase/util/JvmVersion.java src/webapps/master/master.jsp src/webapps/static/hbase.css
Date Wed, 14 Apr 2010 04:19:33 GMT
Author: stack
Date: Wed Apr 14 04:19:33 2010
New Revision: 933856

URL: http://svn.apache.org/viewvc?rev=933856&view=rev
Log:
HBASE-2440 Master UI should check against known bad JDK versions and warn the user

Added:
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/JvmVersion.java
Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/webapps/master/master.jsp
    hadoop/hbase/branches/0.20/src/webapps/static/hbase.css

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=933856&r1=933855&r2=933856&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Wed Apr 14 04:19:33 2010
@@ -128,6 +128,8 @@ Release 0.20.4 - Unreleased
                (Todd Lipcon via Stack)
    HBASE-2423  Update 'Getting Started' for 0.20.4 including making 
                "important configurations more visiable"
+   HBASE-2440  Master UI should check against known bad JDK versions and warn
+               the user (Todd Lipcon via Stack)
 
   NEW FEATURES
    HBASE-2257  [stargate] multiuser mode

Added: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/JvmVersion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/JvmVersion.java?rev=933856&view=auto
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/JvmVersion.java (added)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/JvmVersion.java Wed Apr
14 04:19:33 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/src/webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/webapps/master/master.jsp?rev=933856&r1=933855&r2=933856&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/webapps/master/master.jsp (original)
+++ hadoop/hbase/branches/0.20/src/webapps/master/master.jsp Wed Apr 14 04:19:33 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/src/webapps/static/hbase.css
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/webapps/static/hbase.css?rev=933856&r1=933855&r2=933856&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/webapps/static/hbase.css (original)
+++ hadoop/hbase/branches/0.20/src/webapps/static/hbase.css Wed Apr 14 04:19:33 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;
+}



Mime
View raw message