hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1504956 - /hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java
Date Fri, 19 Jul 2013 18:24:05 GMT
Author: jdcryans
Date: Fri Jul 19 18:24:04 2013
New Revision: 1504956

URL: http://svn.apache.org/r1504956
Log:
HBASE-8975  NPE/HTTP 500 when opening the master's web UI too early

Modified:
    hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java

Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java?rev=1504956&r1=1504955&r2=1504956&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterStatusServlet.java
Fri Jul 19 18:24:04 2013
@@ -63,7 +63,11 @@ public class MasterStatusServlet extends
     List<ServerName> servers = null;
     Set<ServerName> deadServers = null;
     
-    if(master.isActiveMaster()){
+    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();



Mime
View raw message