HBASE-25695 Link to the filter on hbase:meta from user tables panel on master page (#3092)

Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
This commit is contained in:
Michael Stack 2021-03-27 20:35:20 -07:00 committed by stack
parent 93b1163a8b
commit 6a8998b29c
1 changed files with 16 additions and 14 deletions

View File

@ -30,6 +30,7 @@ AssignmentManager assignmentManager = null;
</%args> </%args>
<%import> <%import>
java.util.*; java.util.*;
java.net.URLEncoder;
java.io.IOException; java.io.IOException;
org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil; org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil;
org.apache.hadoop.hbase.client.RegionInfo; org.apache.hadoop.hbase.client.RegionInfo;
@ -602,7 +603,6 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
<th>CLOSED</th> <th>CLOSED</th>
<th>CLOSING</th> <th>CLOSING</th>
<th>OFFLINE</th> <th>OFFLINE</th>
<th>FAILED</th>
<th>SPLIT</th> <th>SPLIT</th>
<th>Other</th> <th>Other</th>
</tr> </tr>
@ -621,37 +621,39 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
int closingRegionsCount = tableRegions.get(RegionState.State.CLOSING).size(); int closingRegionsCount = tableRegions.get(RegionState.State.CLOSING).size();
int offlineRegionsCount = tableRegions.get(RegionState.State.OFFLINE).size(); int offlineRegionsCount = tableRegions.get(RegionState.State.OFFLINE).size();
int splitRegionsCount = tableRegions.get(RegionState.State.SPLIT).size(); int splitRegionsCount = tableRegions.get(RegionState.State.SPLIT).size();
int failedRegionsCount = tableRegions.get(RegionState.State.FAILED_OPEN).size()
+ tableRegions.get(RegionState.State.FAILED_CLOSE).size();
int otherRegionsCount = 0; int otherRegionsCount = 0;
for (List<RegionInfo> list: tableRegions.values()) { for (List<RegionInfo> list: tableRegions.values()) {
otherRegionsCount += list.size(); otherRegionsCount += list.size();
} }
// now subtract known states // now subtract known states
otherRegionsCount = otherRegionsCount - openRegionsCount otherRegionsCount = otherRegionsCount - openRegionsCount
- failedRegionsCount - offlineRegionsCount - offlineRegionsCount - splitRegionsCount
- splitRegionsCount - openingRegionsCount - openingRegionsCount - closedRegionsCount
- closedRegionsCount - closingRegionsCount; - closingRegionsCount;
String encodedTableName = URLEncoder.encode(tableName.getNameAsString());
</%java> </%java>
<tr> <tr>
<td><% tableName.getNamespaceAsString() %></td> <td><% tableName.getNamespaceAsString() %></td>
<td><a href=table.jsp?name=<% tableName.getNameAsString() %>><% tableName.getQualifierAsString() %></a> </td> <td><a href=table.jsp?name=<% encodedTableName %>><% URLEncoder.encode(tableName.getQualifierAsString()) %></a> </td>
<%if (frags != null) %> <%if (frags != null) %>
<td align="center"><% frags.get(tableName.getNameAsString()) != null ? frags.get(tableName.getNameAsString()).intValue() + "%" : "n/a" %></td> <td align="center"><% frags.get(tableName.getNameAsString()) != null ? frags.get(tableName.getNameAsString()).intValue() + "%" : "n/a" %></td>
</%if> </%if>
<td><% tableState.getState() %></td> <td><% tableState.getState() %></td>
<td><% openRegionsCount %></td> <td><% openRegionsCount %></td>
<%if (openingRegionsCount > 0) %> <td><a href="/rits.jsp?table=<% tableName.getNameAsString() %>&state=OPENING"><% openingRegionsCount %></td> <%else><td><% openingRegionsCount %></td> </%if> <%if (openingRegionsCount > 0) %> <td><a href="/table.jsp?name=hbase%3Ameta&scan_table=<% encodedTableName %>&scan_region_state=OPENING"><% openingRegionsCount %></td> <%else><td><% openingRegionsCount %></td> </%if>
<td><% closedRegionsCount %></td> <%if (closedRegionsCount > 0) %> <td><a href="/table.jsp?name=hbase%3Ameta&scan_table=<% encodedTableName %>&scan_region_state=CLOSED"><% closedRegionsCount %></td> <%else><td><% closedRegionsCount %></td> </%if>
<%if (closingRegionsCount > 0) %> <td><a href="/rits.jsp?table=<% tableName.getNameAsString() %>&state=CLOSING"><% closingRegionsCount %></td> <%else><td><% closingRegionsCount %></td> </%if> <%if (closingRegionsCount > 0) %> <td><a href="/table.jsp?name=hbase%3Ameta&scan_table=<% encodedTableName %>&scan_region_state=CLOSING"><% closingRegionsCount %></td> <%else><td><% closingRegionsCount %></td> </%if>
<td><% offlineRegionsCount %></td> <%if (offlineRegionsCount > 0) %> <td><a href="/table.jsp?name=hbase%3Ameta&scan_table=<% encodedTableName %>&scan_region_state=OFFLINE"><% offlineRegionsCount %></td> <%else><td><% offlineRegionsCount %></td> </%if>
<td><% failedRegionsCount %></td> <%if (splitRegionsCount > 0) %> <td><a href="/table.jsp?name=hbase%3Ameta&scan_table=<% encodedTableName %>&scan_region_state=SPLIT"><% splitRegionsCount %></td> <%else><td><% splitRegionsCount %></td> </%if>
<td><% splitRegionsCount %></td>
<td><% otherRegionsCount %></td> <td><% otherRegionsCount %></td>
<td><% desc.toStringCustomizedValues() %></td> <td><% desc.toStringCustomizedValues() %></td>
</tr> </tr>
</%for> </%for>
<p><% tables.size() %> table(s) in set. [<a href=tablesDetailed.jsp>Details</a>]</p> <p><% tables.size() %> table(s) in set. [<a href=tablesDetailed.jsp>Details</a>]. Click count below to
see list of regions currently in 'state' designated by the column title. For 'Other' Region state,
browse to <a href="/table.jsp?name=hbase%3Ameta">hbase:meta</a> and adjust filter on 'Meta Entries' to
query on states other than those listed here. Queries may take a while if the <i>hbase:meta</i> table
is large.</p>
</tbody> </tbody>
</table> </table>
</%if> </%if>