diff --git src/main/resources/hbase-webapps/master/table.jsp src/main/resources/hbase-webapps/master/table.jsp index 24e8c3a..b433e20 100644 --- src/main/resources/hbase-webapps/master/table.jsp +++ src/main/resources/hbase-webapps/master/table.jsp @@ -138,21 +138,44 @@ <%= tableHeader %> <% for(Map.Entry hriEntry : regions.entrySet()) { - int infoPort = master.getServerManager().getHServerInfo(hriEntry.getValue()).getInfoPort(); - String urlRegionServer = - "http://" + hriEntry.getValue().getHostname().toString() + ":" + infoPort + "/"; + HRegionInfo regionInfo = hriEntry.getKey(); + HServerAddress addr = hriEntry.getValue(); + + int infoPort = 0; + String urlRegionServer = null; + + if (addr != null) { + HServerInfo info = master.getServerManager().getHServerInfo(addr); + if (info != null) { + infoPort = info.getInfoPort(); + urlRegionServer = + "http://" + addr.getHostname().toString() + ":" + infoPort + "/"; + } + } %> - <%= Bytes.toStringBinary(hriEntry.getKey().getRegionName())%> - <%= hriEntry.getValue().getHostname().toString() + ":" + infoPort %> - <%= Bytes.toStringBinary(hriEntry.getKey().getStartKey())%> - <%= Bytes.toStringBinary(hriEntry.getKey().getEndKey())%> + <%= Bytes.toStringBinary(regionInfo.getRegionName())%> + <% + if (urlRegionServer != null) { + %> + + <%= addr.getHostname().toString() + ":" + infoPort %> + + <% + } else { + %> + not deployed + <% + } + %> + <%= Bytes.toStringBinary(regionInfo.getStartKey())%> + <%= Bytes.toStringBinary(regionInfo.getEndKey())%> <% } %> <% } } catch(Exception ex) { - ex.printStackTrace(); + ex.printStackTrace(System.err); } } // end else %> diff --git src/main/resources/hbase-webapps/static/hbase.css src/main/resources/hbase-webapps/static/hbase.css index 16307ef..1163fda 100644 --- src/main/resources/hbase-webapps/static/hbase.css +++ src/main/resources/hbase-webapps/static/hbase.css @@ -13,3 +13,7 @@ div.warning { font-size: 110%; font-weight: bold; } + +td.undeployed-region { + background-color: #faa; +}