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 3d5e2303bc8..1f160ea45ec 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -27,6 +27,8 @@
import="java.util.List"
import="java.util.LinkedHashMap"
import="java.util.Map"
+ import="java.util.Set"
+ import="java.util.HashSet"
import="java.util.Collections"
import="java.util.Collection"
import="org.apache.commons.lang.StringEscapeUtils"
@@ -45,6 +47,7 @@
import="org.apache.hadoop.hbase.zookeeper.MetaTableLocator"
import="org.apache.hadoop.hbase.util.Bytes"
import="org.apache.hadoop.hbase.util.FSUtils"
+ import="org.apache.hadoop.hbase.io.ImmutableBytesWritable"
import="org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest"
import="org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState"
import="org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos"
@@ -417,40 +420,45 @@ if ( fqtn != null ) {
Table Schema
+<%
+ Collection families = table.getTableDescriptor().getFamilies();
+ Set familyKeySet = new HashSet<>();
+ for (HColumnDescriptor family: families) {
+ familyKeySet.addAll(family.getValues().keySet());
+ }
+%>
- Column Family Name |
- |
-
- <%
- Collection families = table.getTableDescriptor().getFamilies();
- for (HColumnDescriptor family: families) {
- %>
-
- <%= StringEscapeUtils.escapeHtml(family.getNameAsString()) %> |
-
-
-
- Property |
- Value |
-
+ Property \ Column Family Name |
<%
- Map familyValues = family.getValues();
- for (ImmutableBytesWritable familyKey: familyValues.keySet()) {
- final ImmutableBytesWritable familyValue = familyValues.get(familyKey);
+ for (HColumnDescriptor family: families) {
+ %>
+
+ <%= StringEscapeUtils.escapeHtml(family.getNameAsString()) %>
+ |
+ <% } %>
+
+ <%
+ for (ImmutableBytesWritable familyKey: familyKeySet) {
%>
<%= StringEscapeUtils.escapeHtml(Bytes.toString(familyKey.get(), familyKey.getOffset(), familyKey.getLength())) %>
- |
-
- <%= StringEscapeUtils.escapeHtml(Bytes.toString(familyValue.get(), familyValue.getOffset(), familyValue.getLength())) %>
|
+ <%
+ for (HColumnDescriptor family: families) {
+ String familyValueStr = "-";
+ Map familyValues = family.getValues();
+ if(familyValues.containsKey(familyKey)){
+ final ImmutableBytesWritable familyValue = familyValues.get(familyKey);
+ familyValueStr = Bytes.toString(familyValue.get(), familyValue.getOffset(), familyValue.getLength());
+ }
+ %>
+
+ <%= StringEscapeUtils.escapeHtml(familyValueStr) %>
+ |
+ <% } %>
<% } %>
-
- |
-
- <% } %>
<%
long totalReadReq = 0;