You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/08/02 18:28:50 UTC
[hbase] branch branch-1 updated: Revert "HBASE-24704 Make Table
Schema easier to view with multiple families"
This is an automated email from the ASF dual-hosted git repository.
vjasani pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1 by this push:
new 6e34609 Revert "HBASE-24704 Make Table Schema easier to view with multiple families"
6e34609 is described below
commit 6e34609376fd431d1a16617bf80610c9fd4080fb
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Sun Aug 2 23:58:25 2020 +0530
Revert "HBASE-24704 Make Table Schema easier to view with multiple families"
This reverts commit 4b77c00e4ff6c72eb5ac5c180c476c21d23a83a8.
---
.../main/resources/hbase-webapps/master/table.jsp | 54 +++++++++-------------
1 file changed, 23 insertions(+), 31 deletions(-)
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 1f160ea..3d5e230 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -27,8 +27,6 @@
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"
@@ -47,7 +45,6 @@
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"
@@ -420,45 +417,40 @@ if ( fqtn != null ) {
</table>
<h2>Table Schema</h2>
<table class="table table-striped">
-<%
- Collection<HColumnDescriptor> families = table.getTableDescriptor().getFamilies();
- Set<ImmutableBytesWritable> familyKeySet = new HashSet<>();
- for (HColumnDescriptor family: families) {
- familyKeySet.addAll(family.getValues().keySet());
- }
-%>
<tr>
- <th>Property \ Column Family Name</th>
- <%
- for (HColumnDescriptor family: families) {
- %>
- <th>
- <%= StringEscapeUtils.escapeHtml(family.getNameAsString()) %>
- </th>
- <% } %>
+ <th>Column Family Name</th>
+ <th></th>
</tr>
+ <%
+ Collection<HColumnDescriptor> families = table.getTableDescriptor().getFamilies();
+ for (HColumnDescriptor family: families) {
+ %>
+ <tr>
+ <td><%= StringEscapeUtils.escapeHtml(family.getNameAsString()) %></td>
+ <td>
+ <table class="table table-striped">
+ <tr>
+ <th>Property</th>
+ <th>Value</th>
+ </tr>
<%
- for (ImmutableBytesWritable familyKey: familyKeySet) {
+ Map<ImmutableBytesWritable, ImmutableBytesWritable> familyValues = family.getValues();
+ for (ImmutableBytesWritable familyKey: familyValues.keySet()) {
+ final ImmutableBytesWritable familyValue = familyValues.get(familyKey);
%>
<tr>
<td>
<%= StringEscapeUtils.escapeHtml(Bytes.toString(familyKey.get(), familyKey.getOffset(), familyKey.getLength())) %>
- </td>
- <%
- for (HColumnDescriptor family: families) {
- String familyValueStr = "-";
- Map<ImmutableBytesWritable, ImmutableBytesWritable> familyValues = family.getValues();
- if(familyValues.containsKey(familyKey)){
- final ImmutableBytesWritable familyValue = familyValues.get(familyKey);
- familyValueStr = Bytes.toString(familyValue.get(), familyValue.getOffset(), familyValue.getLength());
- }
- %>
+ </td>
<td>
- <%= StringEscapeUtils.escapeHtml(familyValueStr) %>
+ <%= StringEscapeUtils.escapeHtml(Bytes.toString(familyValue.get(), familyValue.getOffset(), familyValue.getLength())) %>
</td>
- <% } %>
</tr>
<% } %>
+ </table>
+ </td>
+ </tr>
+ <% } %>
</table>
<%
long totalReadReq = 0;