HBASE-8975 NPE/HTTP 500 when opening the master's web UI too early

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1504955 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2013-07-19 18:24:00 +00:00
parent 581c3f2634
commit a97739bd3f
1 changed files with 5 additions and 1 deletions

View File

@ -64,6 +64,10 @@ public class MasterStatusServlet extends HttpServlet {
Set<ServerName> deadServers = null;
if(master.isActiveMaster()) {
if (master.getServerManager() == null) {
response.sendError(503, "Master not ready");
return;
}
metaLocation = getMetaLocationOrNull(master);
//ServerName metaLocation = master.getCatalogTracker().getMetaLocation();
servers = master.getServerManager().getOnlineServersList();