//ServerName metaLocation = master.getCatalogTracker().getMetaLocation();
List<ServerName> servers = master.getServerManager().getOnlineServersList();
Set<ServerName> deadServers = master.getServerManager().getDeadServers().copyServerNames();
response.setContentType("text/html");
MasterStatusTmpl tmpl;
try {
tmpl = new MasterStatusTmpl()
.setFrags(frags)
.setShowAppendWarning(shouldShowAppendWarning(conf))
.setMetaLocation(metaLocation)
.setServers(servers)
.setDeadServers(deadServers)
.setCatalogJanitorEnabled(master.isCatalogJanitorEnabled(null,
RequestConverter.buildIsCatalogJanitorEnabledRequest()).getValue());
} catch (ServiceException s) {
throw new IOException(s);
}
if (request.getParameter("filter") != null)
tmpl.setFilter(request.getParameter("filter"));
if (request.getParameter("format") != null)
tmpl.setFormat(request.getParameter("format"));
tmpl.render(response.getWriter(),
master, admin);
}