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\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!-- Commenting out DOCTYPE so our blue outline shows on hadoop 0.20.205.0, etc.\n     See tail of HBASE-2110 for explaination.\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n-->\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"/>\n<title>HBase Thrift Server</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hbase.css\" />\n</head>\n\n<body>\n<a id=\"logo\" href=\"http://wiki.apache.org/lucene-hadoop/Hbase\"><img src=\"/static/hbase_logo.png\" alt=\"HBase Logo\" title=\"HBase Logo\" /></a>\n<h1 id=\"page_title\">ThriftServer: ");
59        out.print( serverInfo );
60        out.write("</h1>\n<p id=\"links_menu\">\n  <a href=\"/logs/\">Local logs</a>,\n  <a href=\"/stacks\">Thread Dump</a>,\n  <a href=\"/logLevel\">Log Level</a>,\n");
61   if (HBaseConfiguration.isShowConfInServlet()) { 
62        out.write("\n  <a href=\"/conf\">HBase Configuration</a>\n");
63   } 
64        out.write("\n</p>\n<hr id=\"head_rule\" />\n\n<h2>Attributes</h2>\n<table id=\"attributes_table\">\n<col style=\"width: 10%;\"/>\n<col />\n<col style=\"width: 20%;\"/>\n<tr><th>Attribute Name</th><th>Value</th><th>Description</th></tr>\n<tr><td>HBase Version</td><td>");
65        out.print( VersionInfo.getVersion() );
66        out.write(", r");
67        out.print( VersionInfo.getRevision() );
68        out.write("</td><td>HBase version and revision</td></tr>\n<tr><td>HBase Compiled</td><td>");
69        out.print( VersionInfo.getDate() );
70        out.write(',');
71        out.write(' ');
72        out.print( VersionInfo.getUser() );
73        out.write("</td><td>When HBase version was compiled and by whom</td></tr>\n<tr><td>Thrift Server Start Time</td><td>");
74        out.print( new Date(startcode) );
75        out.write("</td><td>Date stamp of when this Thrift server was started</td></tr>\n<tr><td>Thrift Impl Type</td><td>");
76        out.print( implType );
77        out.write("</td><td>Thrift RPC engine implementation type chosen by this Thrift server</td></tr>\n<tr><td>Compact Protocol</td><td>");
78        out.print( compact );
79        out.write("</td><td>Thrift RPC engine uses compact protocol</td></tr>\n<tr><td>Framed Transport</td><td>");
80        out.print( framed );
81        out.write("</td><td>Thrift RPC engine uses framed transport</td></tr>\n</table>\n\n<hr id=\"foot_rule\" />\n<a href=\"http://wiki.apache.org/hadoop/Hbase/ThriftApi\">Apache HBase Wiki on Thrift</a>\n\n</body>\n</html>\n");
82      } catch (Throwable t) {
83        if (!(t instanceof SkipPageException)){
84          out = _jspx_out;
85          if (out != null && out.getBufferSize() != 0)
86            out.clearBuffer();
87          if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
88        }
89      } finally {
90        _jspxFactory.releasePageContext(_jspx_page_context);
91      }
92    }
93  }