PDavid commented on code in PR #6875:
URL: https://github.com/apache/hbase/pull/6875#discussion_r2106181634


##########
hbase-server/src/main/resources/hbase-webapps/master/peerConfigs.jsp:
##########
@@ -0,0 +1,86 @@
+<%--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+--%>
+
+<%@ page contentType="text/html;charset=UTF-8"
+         import="java.util.*"
+         import="org.apache.hadoop.hbase.master.HMaster"
+         
import="org.apache.hadoop.hbase.replication.ReplicationPeerDescription"
+         import="org.apache.hadoop.hbase.replication.ReplicationPeerConfig"
+         
import="org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil"
+         import="org.apache.hadoop.hbase.util.Strings" %>
+
+<%
+  HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER);
+
+  List<ReplicationPeerDescription> peers = null;
+  if (master.getReplicationPeerManager() != null) {
+    peers = master.getReplicationPeerManager().listPeers(null);
+  }
+%>
+  <table class="table table-striped">
+    <tr>
+      <th>Peer Id</th>
+      <th>Cluster Key</th>
+      <th>Endpoint</th>
+      <th>State</th>
+      <th>IsSerial</th>
+      <th>Remote WAL</th>
+      <th>Sync Replication State</th>
+      <th>Bandwidth</th>
+      <th>ReplicateAll</th>
+      <th>Namespaces</th>
+      <th>Exclude Namespaces</th>
+      <th>Table Cfs</th>
+      <th>Exclude Table Cfs</th>
+    </tr>
+<% if (peers != null && peers.size() > 0) { %>
+  <% for (ReplicationPeerDescription peer : peers) { %>
+  <%
+    String peerId = peer.getPeerId();
+    ReplicationPeerConfig peerConfig = peer.getPeerConfig();
+    %>
+    <tr>
+      <td><%= peerId %></td>
+      <td><%= peerConfig.getClusterKey() %></td>
+      <td><%= peerConfig.getReplicationEndpointImpl() %></td>
+      <td><%= peer.isEnabled() ? "ENABLED" : "DISABLED" %></td>
+      <td><%= peerConfig.isSerial() %></td>
+      <td><%= peerConfig.getRemoteWALDir() == null ? "" : 
peerConfig.getRemoteWALDir() %>
+      <td><%= peer.getSyncReplicationState() %>

Review Comment:
   I fixed this,



##########
hbase-server/src/main/resources/hbase-webapps/master/catalogTables.jsp:
##########
@@ -0,0 +1,82 @@
+<%--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+--%>
+
+<%@ page contentType="text/html;charset=UTF-8"
+         import="java.util.*"
+         import="org.apache.hadoop.hbase.NamespaceDescriptor"
+         import="org.apache.hadoop.hbase.TableName"
+         import="org.apache.hadoop.hbase.master.HMaster"
+         import="org.apache.hadoop.hbase.quotas.QuotaUtil"
+         import="org.apache.hadoop.hbase.security.access.PermissionStorage"
+         
import="org.apache.hadoop.hbase.security.visibility.VisibilityConstants"
+         import="org.apache.hadoop.hbase.tool.CanaryTool"
+         import="org.apache.hadoop.hbase.client.*"
+         import="org.apache.hadoop.hbase.util.MasterStatusConstants" %>
+
+<%
+  HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER);
+
+  Map<String, Integer> frags = (Map<String, Integer>) 
request.getAttribute(MasterStatusConstants.FRAGS);
+
+  List<TableDescriptor> sysTables = master.isInitialized() ?
+  
master.listTableDescriptorsByNamespace(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR)
 : null;
+%>
+
+<%if (sysTables != null && sysTables.size() > 0) { %>
+<table class="table table-striped">
+  <tr>
+    <th>Table Name</th>
+    <% if (frags != null) { %>
+      <th title="Fragmentation - Will be 0% after a major compaction and 
fluctuate during normal usage.">Frag.</th>
+    <% } %>
+    <th>Description</th>
+  </tr>
+  <% for (TableDescriptor systemTable : sysTables) { %>
+  <tr>
+    <% TableName tableName = systemTable.getTableName();%>
+      <td><a href="table.jsp?name=<%= tableName %>"><%= tableName %></a></td>
+      <% if (frags != null) { %>
+        <td align="center"><%= frags.get(tableName.getNameAsString()) != null 
? frags.get(tableName.getNameAsString()) + "%" : "n/a" %></td>
+      <% } %>
+    <% String description = null;
+        if (tableName.equals(TableName.META_TABLE_NAME)){
+            description = "The hbase:meta table holds references to all User 
Table regions.";
+        } else if (tableName.equals(CanaryTool.DEFAULT_WRITE_TABLE_NAME)){
+            description = "The hbase:canary table is used to sniff the write 
availbility of"

Review Comment:
   I fixed this,



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to