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.
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());
46 <?xml version=
"1.0" encoding=
"UTF-8" ?>
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">
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>
71 <a class=
"navbar-brand" href=
"/rs-status"><img src=
"/static/hbase_logo_small.png" alt=
"HBase Logo"/></a>
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>
84 </div><!--/.nav-collapse -->
88 <div class=
"container-fluid content">
89 <div class=
"row inner_header">
90 <div class=
"page-header">
91 <h1>Region: <%= displayName
%></h1>
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>
107 <table class=
"table table-striped">
111 <th>Modification time
</th>
113 <%
for(StoreFile sf
: storeFiles
) { %>
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>
121 <p> <%= storeFiles
.size() %> StoreFile(s) in set.
</p>
126 <script src=
"/static/js/jquery.min.js" type=
"text/javascript"></script>
127 <script src=
"/static/js/bootstrap.min.js" type=
"text/javascript"></script>