diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp index 45be52bcfaf..418865fdaca 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -282,6 +282,7 @@ if ( fqtn != null ) { <% Map regDistribution = new TreeMap(); + Map primaryRegDistribution = new TreeMap(); List regions = r.getAllRegionLocations(); if(regions != null && regions.size() > 0) { %> <%= tableHeader %> @@ -304,6 +305,11 @@ if ( fqtn != null ) { Integer i = regDistribution.get(addr); if (null == i) i = Integer.valueOf(0); regDistribution.put(addr, i + 1); + if (withReplica && RegionReplicaUtil.isDefaultReplica(regionInfo.getReplicaId())) { + i = primaryRegDistribution.get(addr); + if (null == i) i = Integer.valueOf(0); + primaryRegDistribution.put(addr, i+1); + } } } %> @@ -341,7 +347,17 @@ if ( fqtn != null ) { <% } %>

Regions by Region Server

+<% +if (withReplica) { +%> + +<% +} else { +%>
Region ServerRegion CountPrimary Region Count
+<% +} +%> <% for (Map.Entry rdEntry : regDistribution.entrySet()) { ServerName addr = rdEntry.getKey(); @@ -350,6 +366,13 @@ if ( fqtn != null ) { +<% +if (withReplica) { +%> + +<% +} +%> <% } %>
Region ServerRegion Count
<%= addr.getHostname().toString() + ":" + addr.getPort() %> <%= rdEntry.getValue()%><%= primaryRegDistribution.get(addr)%>