diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
index c18a8fc..8606b4e 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
@@ -30,6 +30,7 @@
org.apache.hadoop.hbase.protobuf.ProtobufUtil;
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
+ org.apache.hadoop.hbase.client.RegionReplicaUtil;
%import>
<%if (onlineRegions != null && onlineRegions.size() > 0) %>
@@ -87,6 +88,7 @@
Region Name |
Start Key |
End Key |
+ ReplicaID |
<%for HRegionInfo r: onlineRegions %>
@@ -94,6 +96,7 @@
<% r.getRegionNameAsString() %> |
<% Bytes.toStringBinary(r.getStartKey()) %> |
<% Bytes.toStringBinary(r.getEndKey()) %> |
+ <% r.getReplicaId() %> |
%for>
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 8df53cb..6747bfa 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -35,6 +35,7 @@
import="org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest"
import="org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState"
import="org.apache.hadoop.hbase.TableName"
+ import="org.apache.hadoop.hbase.client.RegionReplicaUtil"
import="org.apache.hadoop.hbase.HBaseConfiguration" %>
<%
HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
@@ -42,7 +43,14 @@
HBaseAdmin hbadmin = new HBaseAdmin(conf);
String fqtn = request.getParameter("name");
HTable table = new HTable(conf, fqtn);
- String tableHeader = "Table Regions
| Name | Region Server | Start Key | End Key | Requests |
";
+ String tableHeader;
+ boolean withReplica = false;
+ if (table.getTableDescriptor().getRegionReplication() > 1) {
+ tableHeader = "Table Regions
| Name | Region Server | Start Key | End Key | Requests | ReplicaID |
";
+ withReplica = true;
+ } else {
+ tableHeader = "Table Regions
| Name | Region Server | Start Key | End Key | Requests |
";
+ }
ServerName rl = master.getCatalogTracker().getMetaLocation();
boolean showFragmentation = conf.getBoolean("hbase.master.ui.fragmentation.enabled", false);
boolean readOnly = conf.getBoolean("hbase.master.ui.readonly", false);
@@ -293,6 +301,13 @@
<%= escapeXml(Bytes.toStringBinary(regionInfo.getStartKey())) %> |
<%= escapeXml(Bytes.toStringBinary(regionInfo.getEndKey())) %> |
<%= req%> |
+ <%
+ if (withReplica) {
+ %>
+ <%= regionInfo.getReplicaId() %> |
+ <%
+ }
+ %>
<% } %>