View Javadoc

1   package org.apache.hadoop.hbase.generated.thrift;
2   
3   import javax.servlet.*;
4   import javax.servlet.http.*;
5   import javax.servlet.jsp.*;
6   import org.apache.hadoop.conf.Configuration;
7   import org.apache.hadoop.hbase.HBaseConfiguration;
8   import org.apache.hadoop.hbase.util.VersionInfo;
9   import java.util.Date;
10  
11  public final class thrift_jsp extends org.apache.jasper.runtime.HttpJspBase
12      implements org.apache.jasper.runtime.JspSourceDependent {
13  
14    private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
15  
16    private static java.util.Vector _jspx_dependants;
17  
18    private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector;
19  
20    public Object getDependants() {
21      return _jspx_dependants;
22    }
23  
24    public void _jspService(HttpServletRequest request, HttpServletResponse response)
25          throws java.io.IOException, ServletException {
26  
27      PageContext pageContext = null;
28      HttpSession session = null;
29      ServletContext application = null;
30      ServletConfig config = null;
31      JspWriter out = null;
32      Object page = this;
33      JspWriter _jspx_out = null;
34      PageContext _jspx_page_context = null;
35  
36      try {
37        response.setContentType("text/html;charset=UTF-8");
38        pageContext = _jspxFactory.getPageContext(this, request, response,
39        			null, true, 8192, true);
40        _jspx_page_context = pageContext;
41        application = pageContext.getServletContext();
42        config = pageContext.getServletConfig();
43        session = pageContext.getSession();
44        out = pageContext.getOut();
45        _jspx_out = out;
46        _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");
47  
48        out.write("\n\n\n");
49  
50  Configuration conf = (Configuration)getServletContext().getAttribute("hbase.conf");
51  long startcode = conf.getLong("startcode", System.currentTimeMillis());
52  String listenPort = conf.get("hbase.regionserver.thrift.port", "9090");
53  String serverInfo = listenPort + "," + String.valueOf(startcode);
54  String implType = conf.get("hbase.regionserver.thrift.server.type", "threadpool");
55  String compact = conf.get("hbase.regionserver.thrift.compact", "false");
56  String framed = conf.get("hbase.regionserver.thrift.framed", "false");
57  
58        out.write("\n<!--[if IE]>\n<!DOCTYPE html>\n<![endif]-->\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <title>HBase Thrift Server: ");
59        out.print( listenPort );
60        out.write("</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta name=\"description\" content=\"\">\n\n    <link href=\"/static/css/bootstrap.min.css\" rel=\"stylesheet\">\n    <link href=\"/static/css/bootstrap-theme.min.css\" rel=\"stylesheet\">\n    <link href=\"/static/css/hbase.css\" rel=\"stylesheet\">\n  </head>\n\n  <body>\n  <div class=\"navbar  navbar-fixed-top navbar-default\">\n      <div class=\"container-fluid\">\n          <div class=\"navbar-header\">\n              <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\n                  <span class=\"icon-bar\"></span>\n                  <span class=\"icon-bar\"></span>\n                  <span class=\"icon-bar\"></span>\n              </button>\n              <a class=\"navbar-brand\" href=\"/thrift.jsp\"><img src=\"/static/hbase_logo_small.png\" alt=\"HBase Logo\"/></a>\n          </div>\n          <div class=\"collapse navbar-collapse\">\n              <ul class=\"nav navbar-nav\">\n                <li class=\"active\"><a href=\"/\">Home</a></li>\n");
61        out.write("                <li><a href=\"/logs/\">Local logs</a></li>\n                <li><a href=\"/logLevel\">Log Level</a></li>\n                <li><a href=\"/jmx\">Metrics Dump</a></li>\n                ");
62   if (HBaseConfiguration.isShowConfInServlet()) { 
63        out.write("\n                <li><a href=\"/conf\">HBase Configuration</a></li>\n                ");
64   } 
65        out.write("\n            </ul>\n          </div><!--/.nav-collapse -->\n        </div>\n      </div>\n    </div>\n\n<div class=\"container-fluid content\">\n    <div class=\"row inner_header\">\n        <div class=\"page-header\">\n            <h1>ThriftServer <small>");
66        out.print( listenPort );
67        out.write("</small></h1>\n        </div>\n    </div>\n    <div class=\"row\">\n\n    <section>\n    <h2>Software Attributes</h2>\n    <table id=\"attributes_table\" class=\"table table-striped\">\n        <tr>\n            <th>Attribute Name</th>\n            <th>Value</th>\n            <th>Description</th>\n        </tr>\n        <tr>\n            <td>HBase Version</td>\n            <td>");
68        out.print( VersionInfo.getVersion() );
69        out.write(", r");
70        out.print( VersionInfo.getRevision() );
71        out.write("</td>\n            <td>HBase version and revision</td>\n        </tr>\n        <tr>\n            <td>HBase Compiled</td>\n            <td>");
72        out.print( VersionInfo.getDate() );
73        out.write(',');
74        out.write(' ');
75        out.print( VersionInfo.getUser() );
76        out.write("</td>\n            <td>When HBase version was compiled and by whom</td>\n        </tr>\n        <tr>\n            <td>Thrift Server Start Time</td>\n            <td>");
77        out.print( new Date(startcode) );
78        out.write("</td>\n            <td>Date stamp of when this Thrift server was started</td>\n        </tr>\n        <tr>\n            <td>Thrift Impl Type</td>\n            <td>");
79        out.print( implType );
80        out.write("</td>\n            <td>Thrift RPC engine implementation type chosen by this Thrift server</td>\n        </tr>\n        <tr>\n            <td>Compact Protocol</td>\n            <td>");
81        out.print( compact );
82        out.write("</td>\n            <td>Thrift RPC engine uses compact protocol</td>\n        </tr>\n        <tr>\n            <td>Framed Transport</td>\n            <td>");
83        out.print( framed );
84        out.write("</td>\n            <td>Thrift RPC engine uses framed transport</td>\n        </tr>\n    </table>\n    </section>\n    </div>\n    <div class=\"row\">\n        <section>\n            <a href=\"http://hbase.apache.org/book.html#_thrift\">Apache HBase Reference Guide chapter on Thrift</a>\n        </section>\n    </div>\n</div>\n<script src=\"/static/js/jquery.min.js\" type=\"text/javascript\"></script>\n<script src=\"/static/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n<script src=\"/static/js/tab.js\" type=\"text/javascript\"></script>\n</body>\n</html>\n");
85      } catch (Throwable t) {
86        if (!(t instanceof SkipPageException)){
87          out = _jspx_out;
88          if (out != null && out.getBufferSize() != 0)
89            out.clearBuffer();
90          if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
91        }
92      } finally {
93        _jspxFactory.releasePageContext(_jspx_page_context);
94      }
95    }
96  }