HBASE-2762. Add warning to master if running without append enabled

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@957029 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2010-06-22 20:56:18 +00:00
parent ada9be3cf2
commit 6aa3261fc5
3 changed files with 12 additions and 0 deletions

View File

@ -722,6 +722,7 @@ Release 0.21.0 - Unreleased
HBASE-2683 Make it obvious in the documentation that ZooKeeper needs
permanent storage
HBASE-2764 Force all Chore tasks to have a thread name
HBASE-2762 Add warning to master if running without append enabled
NEW FEATURES
HBASE-1961 HBase EC2 scripts

View File

@ -601,6 +601,7 @@ public class FSUtils {
public static void recoverFileLease(final FileSystem fs, final Path p, Configuration conf)
throws IOException{
if (!isAppendSupported(conf)) {
LOG.warn("Running on HDFS without append enabled may result in data loss");
return;
}
// lease recovery not needed for local file system case.

View File

@ -3,6 +3,7 @@
import="org.apache.hadoop.conf.Configuration"
import="org.apache.hadoop.hbase.util.Bytes"
import="org.apache.hadoop.hbase.util.JvmVersion"
import="org.apache.hadoop.hbase.util.FSUtils"
import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.HConstants"
import="org.apache.hadoop.hbase.master.MetaRegion"
@ -38,6 +39,7 @@
<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>
<!-- Various warnings that cluster admins should be aware of -->
<% if (JvmVersion.isBadJvmVersion()) { %>
<div class="warning">
Your current JVM version <%= System.getProperty("java.version") %> is known to be
@ -46,6 +48,14 @@
for details.
</div>
<% } %>
<% if (!FSUtils.isAppendSupported(conf)) { %>
<div class="warning">
You are currently running the HMaster without HDFS append support enabled.
This may result in data loss.
Please see the <a href="http://wiki.apache.org/hadoop/Hbase/HdfsSyncSupport">HBase wiki</a>
for details.
</div>
<% } %>
<hr id="head_rule" />