HBASE-18382 add transport type info into Thrift UI (#880)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
Signed-off-by: Viraj Jasani <virajjasani007@gmail.com>
This commit is contained in:
Beata Sudi 2019-12-09 10:24:19 +01:00 committed by Wellington Ramos Chevreuil
parent dff7fffe85
commit 82e155eb26
1 changed files with 26 additions and 12 deletions

View File

@ -31,9 +31,14 @@ String serverType = (String)getServletContext().getAttribute("hbase.thrift.serve
long startcode = conf.getLong("startcode", System.currentTimeMillis()); long startcode = conf.getLong("startcode", System.currentTimeMillis());
String listenPort = conf.get("hbase.regionserver.thrift.port", "9090"); String listenPort = conf.get("hbase.regionserver.thrift.port", "9090");
ImplType implType = ImplType.getServerImpl(conf); ImplType implType = ImplType.getServerImpl(conf);
String framed = implType.isAlwaysFramed()
? "true" : conf.get("hbase.regionserver.thrift.framed", "false"); String transport =
String compact = conf.get("hbase.regionserver.thrift.compact", "false"); (implType.isAlwaysFramed() ||
conf.getBoolean("hbase.regionserver.thrift.framed", false)) ? "Framed" : "Standard";
String protocol =
conf.getBoolean("hbase.regionserver.thrift.compact", false) ? "Compact" : "Binary";
String qop = conf.get("hbase.thrift.security.qop", "None");
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
@ -53,12 +58,15 @@ String compact = conf.get("hbase.regionserver.thrift.compact", "false");
<div class="navbar navbar-fixed-top navbar-default"> <div class="navbar navbar-fixed-top navbar-default">
<div class="container-fluid"> <div class="container-fluid">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <button type="button"
class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="/thrift.jsp"><img src="/static/hbase_logo_small.png" alt="HBase Logo"/></a> <a class="navbar-brand" href="/thrift.jsp">
<img src="/static/hbase_logo_small.png" alt="HBase Logo"/>
</a>
</div> </div>
<div class="collapse navbar-collapse"> <div class="collapse navbar-collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
@ -112,26 +120,32 @@ String compact = conf.get("hbase.regionserver.thrift.compact", "false");
<td>Thrift RPC engine implementation type chosen by this Thrift server</td> <td>Thrift RPC engine implementation type chosen by this Thrift server</td>
</tr> </tr>
<tr> <tr>
<td>Compact Protocol</td> <td>Protocol</td>
<td><%= compact %></td> <td><%= protocol %></td>
<td>Thrift RPC engine uses compact protocol</td> <td>Thrift RPC engine protocol type</td>
</tr> </tr>
<tr> <tr>
<td>Framed Transport</td> <td>Transport</td>
<td><%= framed %></td> <td><%= transport %></td>
<td>Thrift RPC engine uses framed transport</td> <td>Thrift RPC engine transport type</td>
</tr> </tr>
<tr> <tr>
<td>Thrift Server Type</td> <td>Thrift Server Type</td>
<td><%= serverType %></td> <td><%= serverType %></td>
<td>The type of this Thrift server</td> <td>The type of this Thrift server</td>
</tr> </tr>
<tr>
<td>Quality of Protection</td>
<td><%= qop %></td>
<td>QOP Settings for SASL</td>
</tr>
</table> </table>
</section> </section>
</div> </div>
<div class="row"> <div class="row">
<section> <section>
<a href="http://hbase.apache.org/book.html#_thrift">Apache HBase Reference Guide chapter on Thrift</a> <a href="http://hbase.apache.org/book.html#_thrift">
Apache HBase Reference Guide chapter on Thrift</a>
</section> </section>
</div> </div>
</div> </div>