HBASE-16317 revert all ESAPI changes
[hbase.git] / hbase-server / src / main / resources / hbase-webapps / regionserver / region.jsp
blob874ac4392440667aa6d23a8e314d7ca7c87ce0ee
1 <%--
2 /**
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 --%>
20 <%@ page contentType="text/html;charset=UTF-8"
21 import="java.util.Collection"
22 import="java.util.Date"
23 import="java.util.List"
24 import="static org.apache.commons.lang.StringEscapeUtils.escapeXml"
25 import="org.apache.hadoop.conf.Configuration"
26 import="org.apache.hadoop.hbase.HTableDescriptor"
27 import="org.apache.hadoop.hbase.HColumnDescriptor"
28 import="org.apache.hadoop.hbase.HBaseConfiguration"
29 import="org.apache.hadoop.hbase.HRegionInfo"
30 import="org.apache.hadoop.hbase.regionserver.HRegionServer"
31 import="org.apache.hadoop.hbase.regionserver.Region"
32 import="org.apache.hadoop.hbase.regionserver.Store"
33 import="org.apache.hadoop.hbase.regionserver.StoreFile"%>
35 String regionName = request.getParameter("name");
36 HRegionServer rs = (HRegionServer) getServletContext().getAttribute(HRegionServer.REGIONSERVER);
37 Configuration conf = rs.getConfiguration();
39 Region region = rs.getFromOnlineRegions(regionName);
40 String displayName = HRegionInfo.getRegionNameAsStringForDisplay(region.getRegionInfo(),
41 rs.getConfiguration());
43 <!--[if IE]>
44 <!DOCTYPE html>
45 <![endif]-->
46 <?xml version="1.0" encoding="UTF-8" ?>
47 <html lang="en">
48 <head>
49 <meta charset="utf-8">
50 <title>HBase RegionServer: <%= rs.getServerName() %></title>
51 <meta name="viewport" content="width=device-width, initial-scale=1.0">
52 <meta name="description" content="">
53 <meta name="author" content="">
56 <link href="/static/css/bootstrap.min.css" rel="stylesheet">
57 <link href="/static/css/bootstrap-theme.min.css" rel="stylesheet">
58 <link href="/static/css/hbase.css" rel="stylesheet">
59 </head>
61 <body>
63 <div class="navbar navbar-fixed-top navbar-default">
64 <div class="container-fluid">
65 <div class="navbar-header">
66 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
67 <span class="icon-bar"></span>
68 <span class="icon-bar"></span>
69 <span class="icon-bar"></span>
70 </button>
71 <a class="navbar-brand" href="/rs-status"><img src="/static/hbase_logo_small.png" alt="HBase Logo"/></a>
72 </div>
73 <div class="collapse navbar-collapse">
74 <ul class="nav navbar-nav">
75 <li class="active"><a href="/rs-status">Home</a></li>
76 <li><a href="/logs/">Local Logs</a></li>
77 <li><a href="/logLevel">Log Level</a></li>
78 <li><a href="/dump">Debug Dump</a></li>
79 <li><a href="/jmx">Metrics Dump</a></li>
80 <% if (HBaseConfiguration.isShowConfInServlet()) { %>
81 <li><a href="/conf">HBase Configuration</a></li>
82 <% } %>
83 </ul>
84 </div><!--/.nav-collapse -->
85 </div>
86 </div>
88 <div class="container-fluid content">
89 <div class="row inner_header">
90 <div class="page-header">
91 <h1>Region: <%= displayName %></h1>
92 </div>
93 </div>
95 <% if(region != null) { //
96 List<Store> stores = region.getStores();
97 for (Store store : stores) {
98 String cf = store.getColumnFamilyName();
99 Collection<StoreFile> storeFiles = store.getStorefiles(); %>
101 <h3>Column Family: <%= cf %></h2>
103 <h4>Memstore size (MB): <%= (int) (store.getMemStoreSize() / 1024 / 1024) %></h3>
105 <h4>Store Files</h3>
107 <table class="table table-striped">
108 <tr>
109 <th>Store File</th>
110 <th>Size (MB)</th>
111 <th>Modification time</th>
112 </tr>
113 <% for(StoreFile sf : storeFiles) { %>
114 <tr>
115 <td><a href="storeFile.jsp?name=<%= sf.getPath() %>"><%= sf.getPath() %></a></td>
116 <td><%= (int) (rs.getFileSystem().getLength(sf.getPath()) / 1024 / 1024) %></td>
117 <td><%= new Date(sf.getModificationTimeStamp()) %></td>
118 </tr>
119 <% } %>
121 <p> <%= storeFiles.size() %> StoreFile(s) in set.</p>
122 </table>
123 <% }
125 </div>
126 <script src="/static/js/jquery.min.js" type="text/javascript"></script>
127 <script src="/static/js/bootstrap.min.js" type="text/javascript"></script>
129 </body>
130 </html>