HBASE-8622 Remove ' You are currently running the HMaster without HDFS append support enabled. This may result in data loss. Please see the HBase wiki for details. ' from UI

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1486346 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-05-25 17:18:27 +00:00
parent fe6bbb0d29
commit e1f9dfe8fb
2 changed files with 5 additions and 24 deletions

View File

@ -23,7 +23,6 @@ Map<String, Integer> frags = null;
ServerName metaLocation = null;
List<ServerName> servers = null;
Set<ServerName> deadServers = null;
boolean showAppendWarning = false;
boolean catalogJanitorEnabled = true;
String filter = "general";
String format = "html";
@ -108,14 +107,6 @@ org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
for details.
</div>
</%if>
<%if showAppendWarning %>
<div class="alert alert-error">
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>
</%if>
<%if master.isInitialized() && !catalogJanitorEnabled %>
<div class="alert alert-error">
Please note that your cluster is running with the CatalogJanitor disabled. It can be

View File

@ -54,12 +54,12 @@ public class MasterStatusServlet extends HttpServlet {
{
HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER);
assert master != null : "No Master in context!";
Configuration conf = master.getConfiguration();
HBaseAdmin admin = new HBaseAdmin(conf);
HBaseAdmin admin = new HBaseAdmin(conf);
Map<String, Integer> frags = getFragmentationInfo(master, conf);
ServerName metaLocation = getMetaLocationOrNull(master);
//ServerName metaLocation = master.getCatalogTracker().getMetaLocation();
List<ServerName> servers = master.getServerManager().getOnlineServersList();
@ -70,7 +70,6 @@ public class MasterStatusServlet extends HttpServlet {
try {
tmpl = new MasterStatusTmpl()
.setFrags(frags)
.setShowAppendWarning(shouldShowAppendWarning(conf))
.setMetaLocation(metaLocation)
.setServers(servers)
.setDeadServers(deadServers)
@ -99,20 +98,11 @@ public class MasterStatusServlet extends HttpServlet {
private Map<String, Integer> getFragmentationInfo(
HMaster master, Configuration conf) throws IOException {
boolean showFragmentation = conf.getBoolean(
"hbase.master.ui.fragmentation.enabled", false);
"hbase.master.ui.fragmentation.enabled", false);
if (showFragmentation) {
return FSUtils.getTableFragmentation(master);
} else {
return null;
}
}
static boolean shouldShowAppendWarning(Configuration conf) {
try {
return !FSUtils.isAppendSupported(conf) && FSUtils.isHDFS(conf);
} catch (IOException e) {
LOG.warn("Unable to determine if append is supported", e);
return false;
}
}
}