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 fef2ed50385..7683242730a 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -26,12 +26,13 @@ import="java.util.LinkedHashMap" import="java.util.List" import="java.util.Map" + import="java.util.Set" + import="java.util.HashSet" import="java.util.Optional" import="java.util.TreeMap" import="java.util.concurrent.TimeUnit" import="org.apache.commons.lang3.StringEscapeUtils" import="org.apache.hadoop.conf.Configuration" - import="org.apache.hadoop.hbase.HColumnDescriptor" import="org.apache.hadoop.hbase.HConstants" import="org.apache.hadoop.hbase.HRegionLocation" import="org.apache.hadoop.hbase.HTableDescriptor" @@ -51,6 +52,7 @@ import="org.apache.hadoop.hbase.client.RegionLocator" import="org.apache.hadoop.hbase.client.RegionReplicaUtil" import="org.apache.hadoop.hbase.client.Table" + import="org.apache.hadoop.hbase.client.ColumnFamilyDescriptor" import="org.apache.hadoop.hbase.http.InfoServer" import="org.apache.hadoop.hbase.master.HMaster" import="org.apache.hadoop.hbase.master.RegionState" @@ -771,40 +773,45 @@ %>

Table Schema

+ +<% + ColumnFamilyDescriptor[] families = table.getDescriptor().getColumnFamilies(); + Set familyKeySet = new HashSet<>(); + for (ColumnFamilyDescriptor family: families) { + familyKeySet.addAll(family.getValues().keySet()); + } +%> - - - - <% - Collection families = new HTableDescriptor(table.getDescriptor()).getFamilies(); - for (HColumnDescriptor family: families) { - %> - - - - - <% } %>
Column Family Name
<%= StringEscapeUtils.escapeHtml4(family.getNameAsString()) %> - - - - - + <% - Map familyValues = family.getValues(); - for (Bytes familyKey: familyValues.keySet()) { + for (ColumnFamilyDescriptor family: families) { + %> + + <% } %> + + <% + for (Bytes familyKey: familyKeySet) { %> - + <% + for (ColumnFamilyDescriptor family: families) { + String familyValue = "-"; + if(family.getValues().containsKey(familyKey)){ + familyValue = family.getValues().get(familyKey).toString(); + } + %> + + <% } %> <% } %> -
PropertyValue
Property \ Column Family Name + <%= StringEscapeUtils.escapeHtml4(family.getNameAsString()) %> +
<%= StringEscapeUtils.escapeHtml4(familyKey.toString()) %> - - <%= StringEscapeUtils.escapeHtml4(familyValues.get(familyKey).toString()) %> + <%= StringEscapeUtils.escapeHtml4(familyValue) %> +
-
<% long totalReadReq = 0;